From c19e6a71b26403e69fb47ca40b71d6c89280274e Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Mon, 1 May 2023 13:45:30 +0200 Subject: [PATCH] ci: allow changing runners through config vars (#3783) * ci: allow changing runners through config vars * fix variable access --------- Co-authored-by: galargh --- .github/workflows/cross-compile.yml | 2 +- .github/workflows/integration.yml | 2 +- .github/workflows/unit.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cross-compile.yml b/.github/workflows/cross-compile.yml index fc2c6ac8..7a8cedf4 100644 --- a/.github/workflows/cross-compile.yml +++ b/.github/workflows/cross-compile.yml @@ -5,7 +5,7 @@ jobs: fail-fast: false matrix: go: [ "1.19.x", "1.20.x" ] - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars['CROSS_COMPILE_RUNNER_UBUNTU'] || '"ubuntu-latest"') }} name: "Cross Compilation (Go ${{matrix.go}})" steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 07b7dc99..e8cba9e2 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -6,7 +6,7 @@ jobs: fail-fast: false matrix: go: [ "1.19.x", "1.20.x" ] - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars['INTEGRATION_RUNNER_UBUNTU'] || '"ubuntu-latest"') }} env: DEBUG: false # set this to true to export qlogs and save them as artifacts TIMESCALE_FACTOR: 3 diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 6cef84d8..6acfdc15 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -8,7 +8,7 @@ jobs: matrix: os: [ "ubuntu", "windows", "macos" ] go: [ "1.19.x", "1.20.x" ] - runs-on: ${{ matrix.os }}-latest + runs-on: ${{ fromJSON(vars[format('UNIT_RUNNER_{0}', matrix.os)] || format('"{0}-latest"', matrix.os)) }} name: Unit tests (${{ matrix.os}}, Go ${{ matrix.go }}) steps: - uses: actions/checkout@v3