-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 1.18 KB
/
get-runner-labels.yml
File metadata and controls
31 lines (29 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Get Runner Labels
on:
workflow_call:
outputs:
LINUX_RUNNER_LABELS:
description: "linux runner labels"
value: ${{ jobs.main.outputs.LINUX_RUNNER_LABELS }}
MACOS_RUNNER_LABELS:
description: "macos runner labels"
value: ${{ jobs.main.outputs.MACOS_RUNNER_LABELS }}
WINDOWS_RUNNER_LABELS:
description: "windows runner labels"
value: ${{ jobs.main.outputs.WINDOWS_RUNNER_LABELS }}
jobs:
main:
name: Get Runner Labels
runs-on: ubuntu-22.04
outputs:
LINUX_RUNNER_LABELS: ${{ steps.run.outputs.LINUX_RUNNER_LABELS }}
MACOS_RUNNER_LABELS: ${{ steps.run.outputs.MACOS_RUNNER_LABELS }}
WINDOWS_RUNNER_LABELS: ${{ steps.run.outputs.WINDOWS_RUNNER_LABELS }}
steps:
- id: run
shell: bash
run: |
# set default value for vars.XXX_RUNNER_LABELS
echo 'LINUX_RUNNER_LABELS=${{ vars.LINUX_RUNNER_LABELS || '"ubuntu-22.04"' }}' >> "$GITHUB_OUTPUT"
echo 'MACOS_RUNNER_LABELS=${{ vars.MACOS_RUNNER_LABELS || '"macos-latest"' }}' >> "$GITHUB_OUTPUT"
echo 'WINDOWS_RUNNER_LABELS=${{ vars.WINDOWS_RUNNER_LABELS || '"windows-latest"' }}' >> "$GITHUB_OUTPUT"