Skip to content

Commit

Permalink
Add GitHub workflow concurrency controls (hashicorp#22610)
Browse files Browse the repository at this point in the history
  • Loading branch information
shore committed Aug 30, 2023
1 parent fc9e308 commit c31817a
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
- '.github/**'
types: [opened, synchronize, reopened, ready_for_review]

# cancel existing runs of the same workflow on the same ref
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
actionlint:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/enos-release-testing-oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
- enos-release-testing-oss
- enos-release-testing-oss::*

# cancel existing runs of the same workflow on the same ref
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
product-metadata:
if: ${{ startsWith(github.event.client_payload.payload.branch, 'release/') }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Security Scan

# cancel existing runs of the same workflow on the same ref
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

on:
push:
branches: [main]
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/stable-website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ on:
types:
- closed

# cancel existing runs of the same workflow on the same ref
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
stable_website_cherry_pick:
if: github.event.pull_request.merged && contains(github.event.pull_request.labels.*.name, 'docs-cherrypick')
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-acc-dockeronly-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
# Change to nightly cadence once API-credential-requiring tests are added to the jobs
workflow_dispatch:

# cancel existing runs of the same workflow on the same ref
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

# Currently the jobs here are only for acceptance tests that have no dependencies except for Docker
jobs:
plugins-database:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-ci-bootstrap.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: test-ci-bootstrap

# cancel existing runs of the same workflow on the same ref
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

on:
workflow_dispatch:
pull_request:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-enos-scenario-ui.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
name: Vault UI Tests

# cancel existing runs of the same workflow on the same ref
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

on:
workflow_call:
inputs:
Expand Down

0 comments on commit c31817a

Please sign in to comment.