Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cancel previous builds within the same PR on push #2614

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/fixup.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: "Just say no to fixup commits"
on:
pull_request:
types: [synchronize, opened, reopened]
workflow_call:

jobs:
block-fixup:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Based on https://www.neilmacy.co.uk/blog/github-action-to-block-merging
name: "Internal PR Required"
on:
workflow_call:
pull_request:
types: [synchronize, opened, reopened, labeled, unlabeled]
types: [labeled, unlabeled]

jobs:
InternalPRRequired:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ on:
branches:
- main

concurrency:
# Cancel existing builds for the same PR.
# Otherwise, all other builds will be allowed to run through.
group: lint.yml-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-24.04
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,18 @@ on:
branches:
- main

concurrency:
# Cancel existing builds for the same PR.
# Otherwise, all other builds will be allowed to run through.
group: test.yml-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true


jobs:
fixup:
uses: ./.github/workflows/fixup.yml
labels:
uses: ./.github/workflows/labels.yml
test:
strategy:
matrix:
Expand Down
Loading