CI: tell e2e:full label events by the PR's labels
CI / checks (push) Skipped
CI / event (pull_request) Successful in 3s
CI / checks (pull_request) Skipped
CI / e2e (pull_request) Skipped

Gitea leaves github.event.label empty.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
This commit is contained in:
dongarandClaude Opus 5.5 committed 2026-10-08 03:40:36 +00:00
1 parent 8bfc1e5f24
commit b80225d821
1 file changed
+7 -5
+7 -5
View File
@@ -25,12 +25,14 @@ on:
# #
# Gitea triggers on `labeled` but hands the workflow its own name for the # Gitea triggers on `labeled` but hands the workflow its own name for the
# action, `label_updated` (and `synchronized` for a push), so each check # 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: concurrency:
group: >- group: >-
${{ github.workflow }}-${{ github.head_ref || github.ref }}${{ ${{ github.workflow }}-${{ github.head_ref || github.ref }}${{
((github.event.action == 'labeled' || github.event.action == 'label_updated') ((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) || '' }} && format('-label-{0}', github.run_id) || '' }}
cancel-in-progress: true cancel-in-progress: true
@@ -44,12 +46,12 @@ jobs:
steps: steps:
- run: | - run: |
echo "action=[${{ github.event.action }}] label=[${{ github.event.label.name }}] event=${{ github.event_name }}" 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: checks:
if: >- if: >-
(github.event.action != 'labeled' && github.event.action != 'label_updated') (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 runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -107,7 +109,7 @@ jobs:
if: >- if: >-
github.event_name != 'push' github.event_name != 'push'
&& ((github.event.action != 'labeled' && github.event.action != 'label_updated') && ((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 needs: checks
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 90 timeout-minutes: 90