Skip to content

Commit 0736709

Browse files
committed
trigger jobs on label change
1 parent 7e7362e commit 0736709

File tree

2 files changed

+42
-39
lines changed

2 files changed

+42
-39
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
name: CI and merge queue checks
1515
on:
1616
pull_request:
17-
types: [opened, reopened, synchronize]
17+
types: [opened, reopened, synchronize, labeled, unlabeled]
1818
merge_group:
1919
types: [checks_requested]
2020
workflow_call:
@@ -29,27 +29,29 @@ jobs:
2929
build_and_test_cross_compilation:
3030
secrets: inherit
3131
uses: ./.github/workflows/build_and_test_cross_compilation.yml
32-
# check if PR can be enqueued to the merge queue
33-
can_enqueue:
34-
if: always() && github.event_name != 'merge_group'
35-
needs:
36-
- pre-commit
37-
- build_and_test_host
38-
permissions:
39-
actions: read
40-
runs-on: ubuntu-latest
41-
steps:
42-
- env:
43-
NEEDS_JSON: "${{toJSON(needs)}}"
44-
name: Transform outcomes
45-
run: |
46-
echo "ALL_SUCCESS=$(echo "$NEEDS_JSON" | jq '. | to_entries | map([.value.result == "success", .value.result == "skipped"] | any) | all')" >>$GITHUB_ENV
47-
- name: check
48-
run: |
49-
[ $ALL_SUCCESS == true ]
32+
# # check if PR can be enqueued to the merge queue
33+
# can_enqueue:
34+
# if: always() && github.event_name != 'merge_group'
35+
# needs:
36+
# - pre-commit
37+
# - build_and_test_host
38+
# - build_and_test_cross_compilation
39+
# permissions:
40+
# actions: read
41+
# runs-on: ubuntu-latest
42+
# steps:
43+
# - env:
44+
# NEEDS_JSON: "${{toJSON(needs)}}"
45+
# name: Transform outcomes
46+
# run: |
47+
# echo "ALL_SUCCESS=$(echo "$NEEDS_JSON" | jq '. | to_entries | map([.value.result == "success", .value.result == "skipped"] | any) | all')" >>$GITHUB_ENV
48+
# - name: check
49+
# run: |
50+
# [ $ALL_SUCCESS == true ]
5051
# check in the merge queue if PR can be merged to main
5152
can_merge:
52-
if: always() && github.event_name == 'merge_group'
53+
if: always()
54+
# && github.event_name == 'merge_group'
5355
needs:
5456
- pre-commit
5557
- build_and_test_host

.github/workflows/ci_qnx.yml

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
name: CI and merge queue checks (QNX)
1515
on:
1616
pull_request_target:
17-
types: [opened, reopened, synchronize]
17+
types: [opened, reopened, synchronize, labeled, unlabeled]
1818
merge_group:
1919
types: [checks_requested]
2020
workflow_call:
@@ -23,26 +23,27 @@ jobs:
2323
build_and_test_qnx:
2424
secrets: inherit
2525
uses: ./.github/workflows/build_and_test_qnx.yml
26-
# check if PR can be enqueued to the merge queue
27-
can_enqueue:
28-
if: always() && github.event_name != 'merge_group'
29-
needs:
30-
- build_and_test_qnx
31-
permissions:
32-
actions: read
33-
runs-on: ubuntu-latest
34-
steps:
35-
- env:
36-
NEEDS_JSON: "${{toJSON(needs)}}"
37-
name: Transform outcomes
38-
run: |
39-
echo "ALL_SUCCESS=$(echo "$NEEDS_JSON" | jq '. | to_entries | map([.value.result == "success", .value.result == "skipped"] | any) | all')" >>$GITHUB_ENV
40-
- name: check
41-
run: |
42-
[ $ALL_SUCCESS == true ]
26+
# # check if PR can be enqueued to the merge queue
27+
# can_enqueue:
28+
# if: always() && github.event_name != 'merge_group'
29+
# needs:
30+
# - build_and_test_qnx
31+
# permissions:
32+
# actions: read
33+
# runs-on: ubuntu-latest
34+
# steps:
35+
# - env:
36+
# NEEDS_JSON: "${{toJSON(needs)}}"
37+
# name: Transform outcomes
38+
# run: |
39+
# echo "ALL_SUCCESS=$(echo "$NEEDS_JSON" | jq '. | to_entries | map([.value.result == "success", .value.result == "skipped"] | any) | all')" >>$GITHUB_ENV
40+
# - name: check
41+
# run: |
42+
# [ $ALL_SUCCESS == true ]
4343
# check in the merge queue if PR can be merged to main
4444
can_merge:
45-
if: always() && github.event_name == 'merge_group'
45+
if: always()
46+
# && github.event_name == 'merge_group'
4647
needs:
4748
- build_and_test_qnx
4849
permissions:

0 commit comments

Comments
 (0)