diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index e7ec349..b125da7 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -22,10 +22,15 @@ on: # is one runner, so a stale run would hold it (and the GPU) to the end. Adding # a label other than e2e:full starts a run whose jobs all skip; it gets a # group of its own, so it can't cancel the real one. +# +# 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. concurrency: group: >- ${{ github.workflow }}-${{ github.head_ref || github.ref }}${{ - (github.event.action == 'labeled' && github.event.label.name != 'e2e:full') + ((github.event.action == 'labeled' || github.event.action == 'label_updated') + && github.event.label.name != 'e2e:full') && format('-label-{0}', github.run_id) || '' }} cancel-in-progress: true @@ -34,8 +39,17 @@ env: FULL: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'e2e:full') }} jobs: + event: # TEMPORARY, for #126: what Gitea puts in the event + runs-on: ubuntu-latest + 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) || '' }}]" + checks: - if: github.event.action != 'labeled' || github.event.label.name == 'e2e:full' + if: >- + (github.event.action != 'labeled' && github.event.action != 'label_updated') + || github.event.label.name == 'e2e:full' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -92,7 +106,8 @@ jobs: # diagnosing (--lf). if: >- github.event_name != 'push' - && (github.event.action != 'labeled' || github.event.label.name == 'e2e:full') + && ((github.event.action != 'labeled' && github.event.action != 'label_updated') + || github.event.label.name == 'e2e:full') needs: checks runs-on: ubuntu-latest timeout-minutes: 90