diff --git a/.github/workflows/gate.yml b/.github/workflows/gate.yml index 8d4962dd..27717f7e 100644 --- a/.github/workflows/gate.yml +++ b/.github/workflows/gate.yml @@ -10,8 +10,8 @@ on: permissions: {} concurrency: - group: gate-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + group: gate-${{ github.event_name == 'pull_request_target' && format('pr-{0}', github.event.pull_request.number) || format('run-{0}', github.run_id) }} + cancel-in-progress: ${{ github.event_name == 'pull_request_target' }} jobs: preflight-docs: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1cc066d4..e2051005 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,8 +9,8 @@ permissions: contents: read concurrency: - group: test-${{ github.sha }} - cancel-in-progress: true + group: test-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || format('run-{0}', github.run_id) }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: preflight-docs: