Skip to content

Commit 4a60464

Browse files
committed
Refine example workflow label gates
1 parent e91187b commit 4a60464

File tree

5 files changed

+75
-0
lines changed

5 files changed

+75
-0
lines changed

.github/workflows/examples-apo.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,23 @@ on:
88

99
workflow_dispatch:
1010

11+
pull_request:
12+
types: [opened, reopened, ready_for_review, labeled]
13+
1114
jobs:
15+
label-check:
16+
name: Label gate (ci-apo)
17+
runs-on: ubuntu-latest
18+
if: >-
19+
github.event_name != 'pull_request' ||
20+
((github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'ready_for_review')
21+
&& contains(github.event.pull_request.labels.*.name, 'ci-apo')) ||
22+
(github.event.action == 'labeled' && github.event.label.name == 'ci-apo')
23+
steps:
24+
- run: echo "Label requirements satisfied"
25+
1226
apo:
27+
needs: label-check
1328
name: APO (Python ${{ matrix.python-version }}, ${{ matrix.setup-script }})
1429
# This job is run on GitHub hosted runners rather than self-hosted runners because it needs no GPU.
1530
runs-on: ubuntu-latest

.github/workflows/examples-calc-x.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,23 @@ on:
88

99
workflow_dispatch:
1010

11+
pull_request:
12+
types: [opened, reopened, ready_for_review, labeled]
13+
1114
jobs:
15+
label-check:
16+
name: Label gate (ci-calc-x)
17+
runs-on: ubuntu-latest
18+
if: >-
19+
github.event_name != 'pull_request' ||
20+
((github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'ready_for_review')
21+
&& contains(github.event.pull_request.labels.*.name, 'ci-calc-x')) ||
22+
(github.event.action == 'labeled' && github.event.label.name == 'ci-calc-x')
23+
steps:
24+
- run: echo "Label requirements satisfied"
25+
1226
calc-x:
27+
needs: label-check
1328
name: Calc-X (Python ${{ matrix.python-version }}, ${{ matrix.setup-script }})
1429
runs-on: [self-hosted, 1ES.Pool=agl-runner-gpu]
1530
timeout-minutes: 90

.github/workflows/examples-compat.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,23 @@ on:
88

99
workflow_dispatch:
1010

11+
pull_request:
12+
types: [opened, reopened, ready_for_review, labeled]
13+
1114
jobs:
15+
label-check:
16+
name: Label gate (ci-compat)
17+
runs-on: ubuntu-latest
18+
if: >-
19+
github.event_name != 'pull_request' ||
20+
((github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'ready_for_review')
21+
&& contains(github.event.pull_request.labels.*.name, 'ci-compat')) ||
22+
(github.event.action == 'labeled' && github.event.label.name == 'ci-compat')
23+
steps:
24+
- run: echo "Label requirements satisfied"
25+
1226
backward-compatibility:
27+
needs: label-check
1328
name: Backward Compatibility (Python ${{ matrix.python-version }}, ${{ matrix.setup-script }})
1429
runs-on: [self-hosted, 1ES.Pool=agl-runner-gpu]
1530
timeout-minutes: 30

.github/workflows/examples-spider.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,23 @@ on:
88

99
workflow_dispatch:
1010

11+
pull_request:
12+
types: [opened, reopened, ready_for_review, labeled]
13+
1114
jobs:
15+
label-check:
16+
name: Label gate (ci-spider)
17+
runs-on: ubuntu-latest
18+
if: >-
19+
github.event_name != 'pull_request' ||
20+
((github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'ready_for_review')
21+
&& contains(github.event.pull_request.labels.*.name, 'ci-spider')) ||
22+
(github.event.action == 'labeled' && github.event.label.name == 'ci-spider')
23+
steps:
24+
- run: echo "Label requirements satisfied"
25+
1226
spider:
27+
needs: label-check
1328
name: Spider (Python ${{ matrix.python-version }}, ${{ matrix.setup-script }})
1429
runs-on: [self-hosted, 1ES.Pool=agl-runner-gpu]
1530
timeout-minutes: 60

.github/workflows/examples-unsloth.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,23 @@ on:
88

99
workflow_dispatch:
1010

11+
pull_request:
12+
types: [opened, reopened, ready_for_review, labeled]
13+
1114
jobs:
15+
label-check:
16+
name: Label gate (ci-unsloth)
17+
runs-on: ubuntu-latest
18+
if: >-
19+
github.event_name != 'pull_request' ||
20+
((github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'ready_for_review')
21+
&& contains(github.event.pull_request.labels.*.name, 'ci-unsloth')) ||
22+
(github.event.action == 'labeled' && github.event.label.name == 'ci-unsloth')
23+
steps:
24+
- run: echo "Label requirements satisfied"
25+
1226
unsloth:
27+
needs: label-check
1328
name: Unsloth (Python ${{ matrix.python-version }}, ${{ matrix.setup-script }})
1429
runs-on: [self-hosted, 1ES.Pool=agl-runner-gpu]
1530
timeout-minutes: 60

0 commit comments

Comments
 (0)