859 questions
95
votes
10
answers
81k
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....
111
votes
7
answers
124k
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 ...
405
votes
36
answers
425k
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-...
141
votes
7
answers
162k
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: ...
288
votes
3
answers
279k
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)...
135
votes
16
answers
164k
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 ...
14
votes
5
answers
16k
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.
225
votes
6
answers
129k
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 ...
150
votes
5
answers
138k
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 ...
103
votes
4
answers
93k
views
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, echo ${GITHUB_REF} | cut -d'/' -f3-${GITHUB_SHA}` is repeated in multiple steps.
...
126
votes
5
answers
217k
views
How do I get the output of a specific step in GitHub Actions?
I have this GitHub Actions workflow which runs tests, but now I am integrating slack notification in it. I want to get the output of the Run tests step and send it as a message in the slack step.
- ...
52
votes
6
answers
39k
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
# ...
283
votes
12
answers
261k
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 ...
232
votes
23
answers
117k
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?
61
votes
9
answers
34k
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 ...