fix(GHA): improve specificity of concurrency (#59677)

This commit is contained in:
Mrugesh Mohapatra
2025-04-12 03:24:12 -05:00
committed by GitHub
parent a78f40f7e6
commit c87ae5a8ba
6 changed files with 9 additions and 13 deletions

View File

@@ -7,15 +7,12 @@ on:
- completed
# TODO: refactor with a workflow_call
pull_request:
paths-ignore:
- 'docs/**'
branches:
- 'main'
- 'next-**'
- 'e2e-**'
- 'temp-**' # Temporary branches allowed on Upstream
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.workflow_run.head_branch || github.ref }}
cancel-in-progress: true
jobs:

View File

@@ -6,13 +6,12 @@ on:
push:
branches:
- 'prod-**'
paths-ignore:
- 'docs/**'
# to test this ad-hoc
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.workflow_run.head_branch || github.ref }}
cancel-in-progress: true
jobs:

View File

@@ -6,7 +6,7 @@ permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.workflow_run.head_branch || github.ref }}
cancel-in-progress: true
jobs:

View File

@@ -5,7 +5,7 @@ on:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.workflow_run.head_branch || github.ref }}
cancel-in-progress: true
jobs:

View File

@@ -5,7 +5,7 @@ on:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.workflow_run.head_branch || github.ref }}
cancel-in-progress: true
jobs:

View File

@@ -10,13 +10,13 @@ on:
pull_request:
branches:
- 'main'
- 'next-**'
- 'temp-**' # Temporary branches allowed on Upstream
# Run on Merge Queue
merge_group:
types: [checks_requested]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.workflow_run.head_branch || github.ref }}
cancel-in-progress: true
permissions: