CI: a newer run cancels the one it supersedes #126

Merged
dev-agent merged 5 commits from ci-concurrency into main 2026-10-08 03:48:09 +00:00
Showing only changes of commit b80225d821 - Show all commits
+7 -5
View File
@@ -25,12 +25,14 @@ on:
#
# Gitea triggers on `labeled` but hands the workflow its own name for the
# action, `label_updated` (and `synchronized` for a push), so each check
# below accepts both.
# below accepts both. Nor does it say which label was added
# (`github.event.label` is empty), so a label event counts when the PR now
# has e2e:full; adding another label to an e2e:full PR restarts its run.
concurrency:
group: >-
${{ github.workflow }}-${{ github.head_ref || github.ref }}${{
((github.event.action == 'labeled' || github.event.action == 'label_updated')
&& github.event.label.name != 'e2e:full')
&& !contains(github.event.pull_request.labels.*.name, 'e2e:full'))
&& format('-label-{0}', github.run_id) || '' }}
cancel-in-progress: true
@@ -44,12 +46,12 @@ jobs:
steps:
- run: |
echo "action=[${{ github.event.action }}] label=[${{ github.event.label.name }}] event=${{ github.event_name }}"
echo "group=[${{ github.workflow }}-${{ github.head_ref || github.ref }}${{ ((github.event.action == 'labeled' || github.event.action == 'label_updated') && github.event.label.name != 'e2e:full') && format('-label-{0}', github.run_id) || '' }}]"
echo "group=[${{ github.workflow }}-${{ github.head_ref || github.ref }}${{ ((github.event.action == 'labeled' || github.event.action == 'label_updated') && !contains(github.event.pull_request.labels.*.name, 'e2e:full')) && format('-label-{0}', github.run_id) || '' }}]"
checks:
if: >-
(github.event.action != 'labeled' && github.event.action != 'label_updated')
|| github.event.label.name == 'e2e:full'
|| contains(github.event.pull_request.labels.*.name, 'e2e:full')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -107,7 +109,7 @@ jobs:
if: >-
github.event_name != 'push'
&& ((github.event.action != 'labeled' && github.event.action != 'label_updated')
|| github.event.label.name == 'e2e:full')
|| contains(github.event.pull_request.labels.*.name, 'e2e:full'))
needs: checks
runs-on: ubuntu-latest
timeout-minutes: 90