diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd104f9..796daa8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,9 @@ name: CI +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + on: pull_request: branches: [main] diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f644b5a..5c61d93 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,5 +1,17 @@ name: Deploy +# Release variant — never cancel a deploy mid-flight. A cancelled deploy +# can leave the Netcup site in a half-deleted state (the script does +# `find . -delete && tar -xzf`). Group by ref so two parallel pushes to +# the same branch serialize cleanly without race-deleting each other. +# +# Security note: this concurrency block uses only server-controlled +# context vars (github.ref, github.workflow) — no PR-author-controlled +# input flows into the group key. +concurrency: + group: release-${{ github.ref }} + cancel-in-progress: false + on: push: branches: [main]