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.community).

Filter by
Sorted by
Tagged with
194votes
26answers
130kviews

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-...
user avatar
  • 5,062
177votes
1answer
51kviews

How to apt-get install in a GitHub Actions workflow?

In the new GitHub Actions, I am trying to install a package in order to use it in one of the next steps. name: CI on: [push, pull_request] jobs: translations: runs-on: ubuntu-latest steps: ...
user avatar
  • 2,592
139votes
7answers
59kviews

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 ...
user avatar
  • 1,666
136votes
13answers
48kviews

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?
user avatar
113votes
2answers
56kviews

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)...
user avatar
  • 21.7k
112votes
4answers
38kviews

How to run a github-actions step, even if the previous step fails, while still failing the job

I'm trying to follow an example Github has for testing my build with github actions, and then compressing the test results and uploading them as an artifact. https://help.github.com/en/actions/...
user avatar
111votes
3answers
70kviews

Running actions in another directory

I've just started exploring Github actions however I've found myself placing a command in multiple places. I have a PHP project where the composer.json is not in the root, my structure looks like: ...
user avatar
  • 1,604
109votes
4answers
34kviews

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 ...
user avatar
  • 2,592
107votes
2answers
51kviews

Repository 'http://security.debian.org/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable' [closed]

Some of my GitHub Actions workflows started recently to return this error when installing Chromedriver: Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB] Get:2 http://...
user avatar
  • 5,552
90votes
7answers
35kviews

Github Action: Split Long Command into Multiple Lines

I have a Github action command that is really long: name: build on: [push] jobs: build: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v1 - name: ...
user avatar
  • 1,297
89votes
5answers
26kviews

Dependencies Between Workflows on Github Actions

I have a monorepo with two workflows: .github/workflows/test.yml name: test on: [push, pull_request] jobs: test-packages: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 ...
user avatar
88votes
6answers
53kviews

How to run GitHub Actions workflows locally?

I am planning to move our Travis CI build to GitHub Actions using Docker for our per-commit testing. Can I reproducibly run these new GitHub Actions workflows locally? Is there a generic way to run ...
user avatar
87votes
22answers
30kviews

Anyone know a way to delete a workflow from GitHub Actions?

I create a couple workflows in the .github/workflows folder of my repository to experiment with GitHub Actions. I have since learned quite a bit and deleted said "experimental" workflows from my repo. ...
user avatar
  • 4,231
79votes
1answer
13kviews

Github Actions: Run step on specific OS

I'm running a workflow on some Operating systems. However, there is a specific step that I have to run only on Ubuntu: runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, ...
user avatar
  • 3,796
77votes
2answers
50kviews

How do I use Docker with GitHub Actions?

When I create a GitHub Actions workflow file, the example YAML file contains runs-on: ubuntu-latest. According to the docs, I only have the options between a couple versions of Ubuntu, Windows Server ...
user avatar
  • 5,497

15 30 50 per page
1
2 3 4 5
315