diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-01-13 14:06:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-13 19:06:30 +0000 |
commit | e09d298a4ac0d0d8a7f3396102422f3dd84dc939 (patch) | |
tree | a1753ee8ef562317ac44b0b3a2d5d4b631d069b8 | |
parent | 3d423e114e46f206ad2c6bfa5dfcb22094c5d2f6 (diff) |
chore(ci): use windows-2022 runner on skipped release job on PRs (#17398)
-rw-r--r-- | .github/workflows/ci.generate.ts | 10 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 3 |
2 files changed, 9 insertions, 4 deletions
diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts index d6a27c9d5..72b62a07d 100644 --- a/.github/workflows/ci.generate.ts +++ b/.github/workflows/ci.generate.ts @@ -2,12 +2,13 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. import * as yaml from "https://deno.land/std@0.171.0/encoding/yaml.ts"; +const windowsRunnerCondition = + "github.repository == 'denoland/deno' && 'windows-2022-xl' || 'windows-2022'"; const Runners = { linux: "${{ github.repository == 'denoland/deno' && 'ubuntu-20.04-xl' || 'ubuntu-20.04' }}", macos: "macos-12", - windows: - "${{ github.repository == 'denoland/deno' && 'windows-2022-xl' || 'windows-2022' }}", + windows: `\${{ ${windowsRunnerCondition} }}`, }; const installPkgsCommand = @@ -200,7 +201,7 @@ const ci = { jobs: { build: { name: "${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}", - "runs-on": "${{ matrix.os }}", + "runs-on": "${{ matrix.runner || matrix.os }}", "timeout-minutes": 120, strategy: { matrix: { @@ -223,6 +224,9 @@ const ci = { }, { os: Runners.windows, + // use a free runner on PRs since this will be skipped + runner: + `\${{ github.event_name == 'pull_request' && 'windows-2022' || (${windowsRunnerCondition}) }}`, job: "test", profile: "release", skip_pr: true, diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7acb239f6..17739fb26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ concurrency: jobs: build: name: '${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}' - runs-on: '${{ matrix.os }}' + runs-on: '${{ matrix.runner || matrix.os }}' timeout-minutes: 120 strategy: matrix: @@ -35,6 +35,7 @@ jobs: job: test profile: fastci - os: '${{ github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'' }}' + runner: '${{ github.event_name == ''pull_request'' && ''windows-2022'' || (github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'') }}' job: test profile: release skip_pr: true |