Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [github-actions]

GitHub Actions allows you to easily automate your software workflows. Use this tag for questions regarding help on creating a workflow. If you need help on GitHub Actions in general, consider contacting GitHub by emailing their support (support.github.com/contact) or by asking in GitHub's Community Forum (github.com/orgs/community/discussions.

github-actions
95 votes
10 answers
80k views

The unauthenticated git protocol on port 9418 is no longer supported

I have been using github actions for quite sometime but today my deployments started failing. Below is the error from github action logs Command: git Arguments: ls-remote --tags --heads git://github....
monofal's user avatar
  • 1,968
105 votes
6 answers
111k views

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 ...
Kirill's user avatar
  • 8,041
385 votes
36 answers
389k views

How to get the current branch within Github Actions?

I'm building Docker images with Github Actions and want to tag images with the branch name. I found the GITHUB_REF variable, but it results in refs/heads/feature-branch-1 and I need only feature-...
aborilov's user avatar
  • 8,324
132 votes
7 answers
143k views

Using output from a previous job in a new one in a GitHub Action

For (mainly) pedagogical reasons, I'm trying to run this workflow in GitHub actions: name: "We 🎔 Perl" on: issues: types: [opened, edited, milestoned] jobs: seasonal_greetings: runs-on: ...
jjmerelo's user avatar
  • 23.2k
269 votes
3 answers
241k views

How do I set an env var with a bash expression in GitHub Actions?

In GitHub Actions, I'd like to evaluate a bash expression and then assign it to an environment variable: - name: Tag image env: GITHUB_SHA_SHORT: ${{ $(echo $GITHUB_SHA | cut -c 1-6)...
evilSnobu's user avatar
  • 25.8k
128 votes
16 answers
142k views

How do I use an env file with GitHub Actions?

I have multiple environments (dev, qa, prod) and I'm using .env files to store secrets etc... Now I'm switching to GitHub Actions, and I want to use my .env files and declare them into the env section ...
HRK44's user avatar
  • 2,632
13 votes
5 answers
15k views

Triggering a new workflow from another workflow?

Can I trigger a new workflow from another workflow? I'm trying to run a workflow after the first workflow has pushed a new release and it seems to ignore it.
bArmageddon's user avatar
  • 8,388
212 votes
6 answers
114k views

Github actions share workspace/artifacts between jobs?

Trying to use Github's beta actions, I have two jobs, one that builds the code and then one that will deploy code. However, I can't seem to get the build artifact in deploy job. My latest attempt is ...
Labithiotis's user avatar
  • 3,947
145 votes
5 answers
129k views

Github Actions - trigger another action after one action is completed

I have one action (a yaml file) for deploying a docker image to Google Cloud Run. I would like to receive Slack or Email messages informing the build and push results. How could the message action be ...
CSSer's user avatar
  • 2,497
98 votes
3 answers
83k views

Github Actions, how to share a calculated value between job steps?

Is there a DRY way to calculate and share a value in multiple job steps with Github Actions? In the below workflow yml file, echo ${GITHUB_REF} | cut -d'/' -f3`-${GITHUB_SHA} is repeated in multiple ...
Casey Flynn's user avatar
  • 13.9k
265 votes
12 answers
233k views

Only run job on specific branch with GitHub Actions

I'm relatively new to GitHub Actions and I have 2 jobs–one that runs my tests, and one that deploys my project onto a server. Obviously I want the tests to run on every branch, but deploying should ...
weakdan's user avatar
  • 2,926
49 votes
5 answers
34k views

How do I make a GitHub Action matrix element conditional?

I have a workflow that uses 'strategy' = 'matrix' along with a list of specific configurations to build. Here is my workflow file: # # build-N-test-v2.1-Dev and build-N-test-v2.1-Release are nearly # ...
lewis's user avatar
  • 1,274
228 votes
23 answers
110k views

How to resolve "refusing to allow an OAuth App to create or update workflow" on git push

Getting refusing to allow an OAuth App to create or update workflow .github/workflows/cd.yml without workflow scope" on git push. How to grant workflow scope?
Ara Yeressian's user avatar
58 votes
8 answers
29k views

Dynamically retrieve GitHub Actions secret

I'm trying to dynamically pull back a GitHub secret using GitHub Actions at runtime: Let's say I have two GitHub Secrets: SECRET_ORANGES : "This is an orange secret" SECRET_APPLES : "This is an ...
Mark McKim's user avatar
47 votes
5 answers
44k views

GitHub Action - Define Workflow Level Environment Variable Between Jobs

I'd like to define and set environment variable between jobs inside my Github Actions Workflow. The workflow below is what I've tried but unfortunately the environment variable GIT_PR_SHA_SHORT and ...
James's user avatar
  • 1,005

15 30 50 per page
1
2 3 4 5
55