From 685869329152b711d79ce87a98108081bc5dc035 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Mon, 22 Apr 2024 21:20:30 +0200 Subject: [PATCH] ci: Be explicit about the version of linux and windows runner images Using the -latest tag is potentially prone to errors, because an update of the tag could break our CI. This recently happend with macos-latest, which we downgraded to macos-12 earlier. Using an explicit version reference makes this problem much less likely - in fact renovate will pick up new versions once they exist and will suggest updates for it. Thus, we will see the failures in a related PR instead of randomly everywhere. --- .github/workflows/build.yaml | 10 +++++----- .github/workflows/check.yaml | 2 +- .github/workflows/ci.yaml | 12 ++++++------ .github/workflows/docs.yaml | 6 +++--- .github/workflows/report.yaml | 2 +- .github/workflows/test.yaml | 8 ++++---- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bbcb3db0a2..f2f110d1a0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -31,7 +31,7 @@ concurrency: jobs: static: name: Nix - Linux static - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Nix Environment @@ -88,7 +88,7 @@ jobs: matrix: include: - name: Linux - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 cache: | ~/.stack .stack-work @@ -102,7 +102,7 @@ jobs: artifact: postgrest-macos-x64 - name: Windows - runs-on: windows-latest + runs-on: windows-2022 cache: | ~\AppData\Roaming\stack ~\AppData\Local\Programs\stack @@ -141,7 +141,7 @@ jobs: freebsd: name: Stack - FreeBSD from CirrusCI - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Get FreeBSD executable from CirrusCI @@ -164,7 +164,7 @@ jobs: ghc: ['9.6.4', '9.8.2'] fail-fast: false name: Cabal - Linux GHC ${{ matrix.ghc }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: ghcup diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 995f3306be..435d85954d 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -18,7 +18,7 @@ concurrency: jobs: lint-style: name: Lint & Style - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Nix Environment diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 03384a2a2c..2679bd7fb6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -46,7 +46,7 @@ jobs: arm: name: Build / Cabal - aarch64 GHC 9.4.8 if: vars.SSH_ARM_ENABLED - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 outputs: remotepath: ${{ steps.Remote-Dir.outputs.remotepath }} env: @@ -117,7 +117,7 @@ jobs: if: | startsWith(github.ref, 'refs/tags/v') && (success() || needs.arm.result == 'skipped') - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: - docs - test @@ -175,7 +175,7 @@ jobs: name: Release / GitHub permissions: contents: write - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: prepare env: VERSION: ${{ needs.prepare.outputs.version }} @@ -229,7 +229,7 @@ jobs: docker: name: Release / Docker Hub - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: - prepare env: @@ -282,7 +282,7 @@ jobs: docker-arm: name: Release / Docker Hub Arm - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: - arm - prepare @@ -316,7 +316,7 @@ jobs: - arm - docker-arm if: startsWith(github.ref, 'refs/tags/v') - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 env: REMOTE_DIR: ${{ needs.arm.outputs.remotepath }} steps: diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index c3f50fd5f2..8974184c69 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -25,7 +25,7 @@ concurrency: jobs: build: name: Build - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Nix Environment @@ -39,7 +39,7 @@ jobs: spellcheck: name: Spellcheck - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Nix Environment @@ -56,7 +56,7 @@ jobs: linkcheck: name: Linkcheck if: github.base_ref == 'main' - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Nix Environment diff --git a/.github/workflows/report.yaml b/.github/workflows/report.yaml index 2a98e6445a..475a39ee40 100644 --- a/.github/workflows/report.yaml +++ b/.github/workflows/report.yaml @@ -15,7 +15,7 @@ jobs: name: Loadtest permissions: checks: write - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 if: github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.conclusion == 'failure' steps: - name: Download from Artifacts diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7737c48057..c962fb197d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -32,7 +32,7 @@ concurrency: jobs: coverage: name: Coverage - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 defaults: run: # Hack for enabling color output, see: @@ -69,7 +69,7 @@ jobs: matrix: pgVersion: ["9_6", 10, 11, 12, 13, 14, 15, 16] name: PG ${{ matrix.pgVersion }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 defaults: run: # Hack for enabling color output, see: @@ -98,7 +98,7 @@ jobs: memory: name: Memory - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Nix Environment @@ -112,7 +112,7 @@ jobs: loadtest: name: Loadtest - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: