-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
1,186 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Determine Workflow Runner group | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
default_runner: | ||
description: The runner type that is used by the calling workflow by default | ||
required: true | ||
type: string | ||
outputs: | ||
runner_group: | ||
description: The runner all subsequent jobs within the calling workflow should run on | ||
value: ${{ jobs.determine_workflow_runner.outputs.runner_group || inputs.default_runner }} | ||
|
||
env: | ||
LARGE_RUNNER_GROUP_NAME: pl-4-core-large-runner | ||
|
||
jobs: | ||
determine_workflow_runner: | ||
runs-on: >- | ||
${{ | ||
( | ||
github.event_name == 'pull_request' | ||
&& contains(github.event.pull_request.labels.*.name, 'urgent') | ||
) && 'pl-4-core-large-runner' || 'ubuntu-latest' | ||
}} | ||
outputs: | ||
runner_group: ${{ steps.runner_group.outputs.runner_group }} | ||
|
||
steps: | ||
- name: Output Runner Group name | ||
if: >- | ||
${{ | ||
github.event_name == 'pull_request' | ||
&& contains(github.event.pull_request.labels.*.name, 'urgent') | ||
&& startsWith(inputs.default_runner, 'ubuntu') | ||
}} | ||
id: runner_group | ||
run: echo "runner_group=$LARGE_RUNNER_GROUP_NAME" >> $GITHUB_OUTPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.