From fa9838fed8b7f43603af65d5282561c55a9a44fb Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Sat, 8 Jul 2023 19:45:35 -0400 Subject: [PATCH] Use GitHub Actions variable for Ubuntu version 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 https://github.com/pelias/pelias/issues/951 https://github.com/organizations/pelias/settings/variables/actions --- .github/workflows/_test.yml | 2 +- .github/workflows/push.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml index 668608d6b..1d647a2bc 100644 --- a/.github/workflows/_test.yml +++ b/.github/workflows/_test.yml @@ -6,7 +6,7 @@ jobs: strategy: matrix: os: - - ubuntu-20.04 + - ${{ vars.UBUNTU_VERSION }} node-version: - 12.x - 14.x diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index fc5664ff1..6c8fc07f0 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -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 @@ -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