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 action 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:

70 questions
26
votes
2 answers

Push to origin from GitHub action

I'm trying to push to origin remote from GitHub action. The logic of my action is: handle pull_request_review events and filter by comment message checkout to master, merge PR branch, run some checks and push it to origin The script is: if [[…
Kirill
  • 5,718
  • 3
  • 33
  • 67
13
votes
1 answer

How to check for a label in a github action condition

Let's say I have a github action like this: name: My Action on: pull_request: types: - closed jobs: myjob: runs-on: ubuntu-latest name: Test if: github.event.pull_request.merged && XXX I would like to have a condition…
Denis Rouzaud
  • 1,701
  • 16
  • 34
8
votes
2 answers

How to cache docker-compose build inside github-action

Is there any way to cache docker-compose so that it will not build again and again? here is my action workflow file: name: Github Action on: push: branches: - staging jobs: test: runs-on: ubuntu-18.04 steps: - uses:…
5
votes
2 answers

how to make a github action matrix element conditional

I have a workflow that uses 'strategy' = 'matrix' and a list of specific configurations to build. Link to Workflow YAML (also provided below) # # build-N-test-v2.1-Dev and build-N-test-v2.1-Release are neary # identical, but a few tests are…
lewis
  • 259
  • 3
  • 17
4
votes
1 answer

GitHub Actions defaults setting

Official github actions documentation says I can set the defaults to specfify defaults settings for all jobs (https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaults). I want to set that up to specify defaults: …
4
votes
1 answer

Delete multiple issue/PR comments via the GitHub API

I want to delete multiple PRs/issues comments at once with GitHub Actions over the GitHub API. Is there a way to do this without showing the delete message multiple times like the following image? For example, I thought there may be a way to delete…
3
votes
1 answer

Github actions: NPM publish 404 not found

In my github project Im trying to automatically create a new version and publish it to NPM whenever something is pushed to the master branch. The idea Create a new minor version Publish the package to NPM Im using github actions. My workflow file…
3
votes
1 answer

pass local.properties in build.gradle android through Git Hub secret

I am trying to automate build process of android app, I have stored baseUrl in local.properties file, and passing file content through Github secret, but Github action is keep failing, build.gradle: def…
3
votes
3 answers

How to perform string manipulation while declaring env vars in GitHub Actions

I have a github repository like the following johndoe/hello-world I am trying to set the following environment variables in github actions env: DOCKER_HUB_USERID: ${{ github.actor }} REPOSITORY_NAME: ${GITHUB_REPOSITORY#*\/} …
2
votes
0 answers

GitHub Action - trigger on push from branch A to branch B, but not fork to branch B

My Repo has Branches Apple, Banana & master. I want to run the action when I push from Branch Apple to Branch Banana, but NOT when Pull Requests are merged into Branch B. Current Draft of the action starts as; on: push: branches: -…
Jayden
  • 121
  • 3
2
votes
0 answers

Firebase Hosting - Preview Channel blocked (reason: forbidden)

I'm setting up Firebase's new Preview Channels (very excited for). I have set up their standard Deploy to Preview Channel workflow, and it does deploy and post the comment! However, when I click the link and try to log into my site, I get the…
Rbar
  • 3,112
  • 8
  • 30
  • 59
2
votes
0 answers

How to create a Docker container GitHub Action to provide executable for the main workflow?

I want to implement my own Docker GitHub Action that should provide an executable called my-tool which I can use in my workflows. Ideally, I want to be able to write the following config in my workflow: - name: Setup My Tool uses:…
2
votes
2 answers

Github Action Service Container from Dockerfile in same repo

I'm learning Github Actions and designing a workflow with a job that requires a Service Container. The documentation states that configuration must specify "The Docker image to use as the service container to run the action. The value can be the…
tomfumb
  • 3,371
  • 2
  • 29
  • 43
2
votes
1 answer

Cannot cache dependencies on Github Actions using Pipenv

I am trying to cache dependencies for a Github Action workflow. I use Pipenv. this is my config: - uses: actions/cache@v1 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/Pipfile') }} …
COB
  • 218
  • 1
  • 11
2
votes
0 answers

how to run `prisma deploy` inside github-action

I have built and run docker-compose. it is showing that it runs on localhost:4466 on GitHub action. but the problem is, when tried to deploy it, I am getting the following error: Could not connect to the server at ***. Please check if your server is…
Ashik
  • 1,011
  • 10
  • 24
1
2 3 4 5