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
8
votes
2 answers

Github Actions - How can I make my env variable(stored in .env file) available in my workflow

I'll try to be as clear as possible. I have also asked about related issues but didn't receive a convincing response. I'm using React and firebase for hosting. Also, I'm storing my firebase web API key in my .env file. I set up firebase hosting…
8
votes
2 answers

Github action manual execution not working

I have 3 different workflows in a project configured at top as: plan_streamline.yml name: plan on: push: branches: - main workflow_dispatch: ... terrform_import.yml name: terraform_import on:…
Sauron
  • 6,399
  • 14
  • 71
  • 136
8
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: …
Ivo Valchev
  • 215
  • 3
  • 11
8
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…
7
votes
1 answer

How to find out if the Github Actions event that triggered the current workflow is a new pull request?

I have a Github Actions workflow that fires on: on: pull_request: types: - synchronize - opened that runs my custom action: jobs: my_job: uses: "org/repo/.github/workflows/main.yml@master" In the action org/repo I want to…
gvlasov
  • 18,638
  • 21
  • 74
  • 110
7
votes
3 answers

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…
6
votes
1 answer

Configuration of GitHub Actions: Avoid running CI twice when merging PR into main

I am using GitHub a ctions to manage my CI and the following events trigger my workflow: on: pull_request: branches: main push: branches: main I observed the following "problem": When I create a PR, the CI is run. If the test passes and…
Sebastian
  • 865
  • 5
  • 13
6
votes
1 answer

How to create a folder in github workflow?

I'm trying to copy contents of a folder into another one during a github workflow. I know the workflow can create new folders and files because calling build on a react project creates the build that isn't present in the project, but it throws an…
Mr.Drew
  • 939
  • 2
  • 9
  • 30
6
votes
1 answer

Disable Github Action workflow, only run when desired

I have some very expensive benchmarks/tests which I'd only like to run on some PRs, not all. Is there a way to do this with github actions?
6
votes
2 answers

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…
5
votes
2 answers

How to pull docker image from ECR in Githubactions

I'm trying to pull docker image from ECR and deploy it on ec2 instance. However it's throwing an error like docker pull $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG ======END====== err: invalid reference format 2022/11/03 15:31:54 Process exited with…
5
votes
3 answers

How to use a custom github action from another repository in my organization?

I'm following the examples of a docker Github action to create my own action. I would like to keep the action in a private repository in my organization, and then re-use it from another repositories under the same organization. The documentation…
Sagi Mann
  • 2,967
  • 6
  • 39
  • 72
5
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,669
  • 3
  • 34
  • 50
4
votes
0 answers

GitHub Action - reusable workflow: Run a github actions workflow in the context of the called workflow

I got a "caller" workflow and a "called" workflow. Caller workflow: name: caller on: workflow_dispatch: jobs: call-another-workflow: uses: project/called/.github/workflows/main.yml@main Called workflow: name: called on: …
4
votes
2 answers

GitHub Actions fails with reading JToken from JsonReader error

I am trying to follow the How to use GitHub Actions build matrix to deploy artifacts to multiple servers tutorial. I have finished halfway through the tutorial, however, I get the following error when it builds the app. Error when evaluating…
Isuru
  • 3,818
  • 13
  • 49
  • 64
1
2
3
11 12