Skip to content

Commit

Permalink
Use GitHub Actions variable for Ubuntu version
Browse files Browse the repository at this point in the history
This is a new approach to managing our Ubuntu version for CI where the
version comes from a Github Actions variable instead of being hardcoded.

Hopefully this makes it easier for us to change the version in one go
across all our repositories instead of having to make dozens of commits
that are similar.

The variable's value is currently set to ubuntu-22.04, so this also
handles pelias/pelias#951

https://github.com/organizations/pelias/settings/variables/actions
  • Loading branch information
orangejulius committed Jul 14, 2023
1 parent 6d7fcaf commit fa9838f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
strategy:
matrix:
os:
- ubuntu-20.04
- ${{ vars.UBUNTU_VERSION }}
node-version:
- 12.x
- 14.x
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
npm-publish:
needs: unit-tests
if: github.ref == 'refs/heads/master' && needs.unit-tests.result == 'success'
runs-on: ubuntu-20.04
runs-on: ${{ vars.UBUNTU_VERSION }}
steps:
- uses: actions/checkout@v2
- name: Install Node.js
Expand All @@ -26,7 +26,7 @@ jobs:
# note: github actions won't run a job if you don't call one of the status check functions, so `always()` is called since it evalutes to `true`
if: ${{ always() && needs.unit-tests.result == 'success' && (needs.npm-publish.result == 'success' || needs.npm-publish.result == 'skipped') }}
needs: [unit-tests, npm-publish]
runs-on: ubuntu-20.04
runs-on: ${{ vars.UBUNTU_VERSION }}
steps:
- uses: actions/checkout@v2
- name: Build Docker images
Expand Down

0 comments on commit fa9838f

Please sign in to comment.