Skip to content

Commit d4a60cf

Browse files
committed
fix workflow error:
Unexpected symbol: '%'. Located at position 16 within expression: (github.run_id % 2 == 0) && fromJSON('["self-hosted", "Linux", "X64", "1ES.Pool=hld-kvm-amd"]') || fromJSON('["self-hosted", "Linux", "X64", "1ES.Pool=hld-kvm-intel"]') Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
1 parent c3ddfb5 commit d4a60cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/copilot-setup-steps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on: workflow_dispatch
66
jobs:
77
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
88
copilot-setup-steps:
9-
# run on AMD when the run_id is even, Intel when the run_id is odd
10-
runs-on: ${{ (github.run_id % 2 == 0) && fromJSON('["self-hosted", "Linux", "X64", "1ES.Pool=hld-kvm-amd"]') || fromJSON('["self-hosted", "Linux", "X64", "1ES.Pool=hld-kvm-intel"]') }}
9+
# run on AMD when the run_id ends in 0,2,4,6,8, Intel when it ends in 1,3,5,7,9 so as not to over use one pool too much
10+
runs-on: ${{ (endsWith(github.run_id, '0') || endsWith(github.run_id, '2') || endsWith(github.run_id, '4') || endsWith(github.run_id, '6') || endsWith(github.run_id, '8')) && fromJSON('["self-hosted", "Linux", "X64", "1ES.Pool=hld-kvm-amd"]') || fromJSON('["self-hosted", "Linux", "X64", "1ES.Pool=hld-kvm-intel"]') }}
1111

1212
# Set the permissions to the lowest permissions possible needed for your steps.
1313
# Copilot will be given its own token for its operations.

0 commit comments

Comments
 (0)