@@ -2,9 +2,10 @@ name: PR OSP (label-selected)
22
33# Run any nightly OSP / sweep job on a PR by adding a label. Add
44# `ci:<name>` (e.g. ci:hostap) to run that job, or `ci:all` for the
5- # whole set. Each label add runs only that job, so adding several at
6- # once gives one clean run per job with no duplication. Re-add a label
7- # to re-run after a push. workflow_dispatch `jobs` input is the off-PR
5+ # whole set. Add several at once and they all run in ONE workflow run:
6+ # the burst of label events collapses (cancel-in-progress) to a single
7+ # run whose select reads every current ci:* label. Re-add a label to
8+ # re-run after a push. workflow_dispatch `jobs` input is the off-PR
89# equivalent (space list, or "all").
910
1011on :
@@ -23,8 +24,8 @@ permissions:
2324 actions : read
2425
2526concurrency :
26- group : pr-osp-select-${{ github.ref }}-${{ github.event.label.name }}
27- cancel-in-progress : false
27+ group : pr-osp-select-${{ github.ref }}
28+ cancel-in-progress : true
2829
2930jobs :
3031 select :
@@ -34,13 +35,15 @@ jobs:
3435 steps :
3536 - id : p
3637 env :
37- LABEL : ${{ github.event.label. name }}
38+ LABELS : ${{ join( github.event.pull_request.labels.*. name, ' ') }}
3839 DISPATCH : ${{ github.event.inputs.jobs }}
3940 run : |
4041 sel=""
41- case "$LABEL" in
42- ci:*) sel="${LABEL#ci:}" ;;
43- esac
42+ for l in $LABELS; do
43+ case "$l" in
44+ ci:*) sel="$sel ${l#ci:}" ;;
45+ esac
46+ done
4447 [ -n "$DISPATCH" ] && sel="$sel $DISPATCH"
4548 echo "run= $sel " >> "$GITHUB_OUTPUT"
4649
0 commit comments