Skip to content

Commit

Permalink
feat(repo): cancel in progress workflows on same branch (#18975)
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerLamTd authored Feb 20, 2025
1 parent e44ee25 commit e5e9f6a
Show file tree
Hide file tree
Showing 20 changed files with 80 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/bridge-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
paths:
- "packages/bridge-ui/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-test:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docs-site--preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
branches-ignore:
- release-please--branches--**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
deploy-docs-site-preview:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.event.pull_request.head.repo.fork == false && github.actor != 'dependabot[bot]' }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/eventindexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
branches-ignore:
- release-please--branches--**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint-eventindexer:
name: lint-eventindexer
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/fork-diff--preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
branches-ignore:
- release-please--branches--**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
deploy-fork-diff-preview:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/guardian-prover-health-check-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
branches-ignore:
- release-please--branches--**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-test:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/guardian-prover-health-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
branches-ignore:
- release-please--branches--**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint-guardian-prover-health-check:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/monitors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
branches-ignore:
- release-please--branches--**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
deploy-protocol-monitors:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/nfts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
branches-ignore:
- release-please--branches--**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-nfts-contracts:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/protocol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ on:
branches-ignore:
- release-please--branches--**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-protocol:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/relayer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
branches-ignore:
- release-please--branches--**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint-relayer:
name: lint-relayer
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/repo--auto-approve-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
branches-ignore:
- release-please--branches--**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
auto-approve:
if: github.event.pull_request.draft == false && github.actor == 'dependabot[bot]'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/repo--do-not-merge-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
pull_request:
types: [labeled, unlabeled, synchronize, opened, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check_label:
if: github.event.pull_request.draft == false
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/repo--merge-gatekeeper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- main
merge_group: # Trigger in merge queue to pass the required status check

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
merge-gatekeeper:
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/repo--typo-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Typo Check

on: [pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check-for-typos:
if: ${{ contains(github.event.pull_request.labels.*.name, 'option.workflow_on') || github.event.pull_request.draft == false && github.head_ref != 'release-please-*' && github.actor != 'dependabot[bot]' }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/repo--validate-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- opened
- edited

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
validate-pr-title:
if: contains(github.event.pull_request.labels.*.name, 'option.workflow_on') || github.event.pull_request.draft == false && github.head_ref != 'release-please-*'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/supplementary-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
branches-ignore:
- release-please--branches--**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-supplementary-contracts:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/taiko-client--docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
paths:
- "packages/taiko-client/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
REGISTRY_IMAGE: us-docker.pkg.dev/evmchain/images/taiko-client

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/taiko-client--hive-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
branches-ignore:
- release-please--branches--**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
hive_tests:
if: ${{ github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'option.hive-test') }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/taiko-client--pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
paths:
- "packages/taiko-client/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
generate-and-deploy:
runs-on: [arc-runner-set]
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/taiko-client--test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
branches-ignore:
- release-please--branches--**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && github.actor != 'dependabot[bot]' }}
Expand Down

0 comments on commit e5e9f6a

Please sign in to comment.