Questions tagged [building-github-actions]

Questions should be tagged with building-github-actions if the question is about creating custom actions like the examples in https://github.com/actions. Questions should not be tagged with this tag if the question is about using GitHub actions/writing GitHub Actions yml files.

From the documentation:

Actions are individual tasks that you can combine to create jobs and customize your workflow. You can create your own actions, and use and customize actions shared by the GitHub community.

There are some sample actions here but this tag is about building own actions.

Currently, there are 2 types of actions:

177 questions
4
votes
1 answer

How can i get the Passing/Failing status of a Github Action Workflow?

I have been looking at the GitHub REST API and i have been trying to find out where I can find the endpoint to get the status of a workflow in my actions. The only way i can tell if it is passing or failing is by downloading the badge.svg.
dwardu
  • 573
  • 6
  • 22
4
votes
1 answer

Unable to reclaim Storage for Actions and Packages after deleting all files

When i try to run a github action (it will build android apk) it showing an error You've used 100% of included services for GitHub Storage (GitHub Actions and Packages). GitHub Actions and Packages won’t work until a monthly spending limit is…
4
votes
1 answer

Output from GitHub action is empty

I'm creating my first GitHub action and I can't figure out why the output is empty. action.yml name: "Run Endtest functional tests" description: "Register a deployment event with Endtest and run the functional tests" branding: icon: play-circle …
4
votes
1 answer

set GitHub Actions input value for local testing

I'm writing a GitHub action that receives a mandatory input field named file using @actions/core library. const core = require("@actions/core"); async function run() { try { let file = core.getInput('file', {required: true}); …
Jossef Harush Kadouri
  • 32,361
  • 10
  • 130
  • 129
3
votes
1 answer

How to determine if the GitHub action is running with `debug logging` enabled

I'm writing a Docker-based GitHub action in Python. I would like to add more verbosity to its output if at some point it fails and the user opts to rerun it with debug logging enabled. So my question is: is it possible to determine it from inside of…
3
votes
2 answers

Is there a way to trigger a GH Action for each directory updated?

I'm trying to create a GH Action workflow, that Zips the directory that is updated, and then pushes each Zip file to a Source, with different configuration flags (e.g. name flag will be different for each zip file). E.g. Let's say I have 4…
fuzzi
  • 1,967
  • 9
  • 46
  • 90
3
votes
1 answer

How to use CHOWN in github workflow?

I'm trying to deploy my rails app using Capistrano during a GitHub workflow. I know the workflow can run script bash, but it throws an error in a subsequent run command that uses chown. Error: chown: cannot access /var/www/html/xxxx/xxxx/: No such…
3
votes
2 answers

Working Directory for local github actions in subdirectory

I'm trying to keep multiple github actions in the same monorepo using subdirectories, and run them like: workflow.yml // [...] jobs: run_my_script: runs-on: ubuntu-latest steps: - name: Check out current repo uses:…
David
  • 53
  • 1
  • 7
3
votes
2 answers

Github Actions Conditional Trigger

I need help figuring something, I am trying to trigger 2 different workflows based on 2 different release tags. I want prod-* to trigger the production workflow and dev-* for the development workflow. The problem is both tags trigger both workflows…
Carlos Silva
  • 101
  • 2
  • 9
3
votes
2 answers

GitHub Action to trigger fails to connect jenkins

I am trying to trigger jenkins build with GitHub Action using following workflow file name: Trigger Jenkins Build [ Backend ] on: pull_request: branches: [ master ] types: [ closed ] env: JENKINS_HOST: "http://jenkins.example.net:8080/" …
roy
  • 6,344
  • 24
  • 92
  • 174
3
votes
1 answer

How do I hook and execute cleanup commands in a GitHub Action when someone cancels the job?

I'm creating an action (using actions/javascript-actions) that creates something and then needs to clean up that something should someone cancel the job halfway. I'm having trouble finding how to hook into pre-exit/cancel and do cleanup actions. Is…
NorseGaud
  • 355
  • 1
  • 11
3
votes
1 answer

Github actions error An action could not be found

I have a simple nodejs app on GitHub and I want to build a docker image and push to AWS ECR with GitHub actions. aws.yml:- name: foo-bar CI on: pull_request: branches: - sandbox push: branches: - sandbox …
Bopsi
  • 2,090
  • 5
  • 36
  • 58
3
votes
1 answer

how to read env variables of docker-compose file and package.json file from github action?

from my docker-compose file I have to read an env variable. locally, I can read that variable like this: ENV_FILE=.env docker-compose -f docker-compose.dev.prisma.yml up --build but as .env file is in .gitignore, GitHub action can't get that file.…
3
votes
1 answer

How to replace a API key with a Secret in code during Github Actions Job?

I usually hide my API key in an XML file and use .gitignore along with getString() to retrieve my API key. I'm trying to use Github Actions to automate Gradle build and Release of debug apk's. Due to the XML file not being uploaded to the repo,…
CyberShark
  • 410
  • 5
  • 16
2
votes
3 answers

Github action the `set-output` command is deprecated

I have the following github action, I am given the following warnings: build-android The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see:…
Paul
  • 3,644
  • 9
  • 47
  • 113
1 2
3
11 12