Skip to content

Commit

Permalink
feat: update workflows to stop previous job if a new one is added, sk…
Browse files Browse the repository at this point in the history
…ip tranlsation branches (#25899)
  • Loading branch information
devindford authored Oct 24, 2024
1 parent 961cdf3 commit 5006aa1
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/check_cache_values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ concurrency:

jobs:
check-cache-values:
if: github.ref != 'refs/heads/guacbot/translation-pipeline'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/codeowner_review_status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:

permissions: {}

# Stop the current running job if a new push is made to the PR
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
check-code-owners-approval:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/datadog-static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ permissions:

jobs:
static-analysis:
if: github.ref != 'refs/heads/guacbot/translation-pipeline'
runs-on: ubuntu-latest
name: Datadog Static Analyzer
steps:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/gif_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ on:
paths:
- 'static/images/**/*'

# Stop the current running job if a new push is made to the PR
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
look-for-gifs:
if: github.ref != 'refs/heads/guacbot/translation-pipeline'
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Set documentation preview
if: github.event.pull_request.head.repo.fork == false
if: github.event.pull_request.head.repo.fork == false && github.ref != 'refs/heads/guacbot/translation-pipeline'
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/merge_label_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ permissions:
contents: read
pull-requests: read

# Stop the current running job if a new push is made to the PR
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
new-check-for-merge-label:
if: github.ref != 'refs/heads/guacbot/translation-pipeline'
runs-on: ubuntu-latest
name: "Merge is not allowed when 'Do Not Merge' label is present"
steps:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/preview_link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ permissions:
contents: read
pull-requests: write

# Stop the current running job if a new push is made to the PR
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
preview-link:
if: contains(github.head_ref, '/')
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/synthetics.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Preview Synthetics
on: [pull_request]
on:
pull_request:
types: [opened, synchronize]
branches:
- master
workflow_dispatch: # allows manual trigger

# Stop the current running job if a new push is made to the PR
concurrency:
Expand All @@ -11,6 +16,7 @@ permissions:

jobs:
synthetic_testing:
if: github.ref != 'refs/heads/guacbot/translation-pipeline'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/vale_linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
permissions:
contents: read

# Stop the current running job if a new push is made to the PR
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
vale:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/validate_filenames.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ permissions:

jobs:
run_static_asset_validation:
if: github.ref != 'refs/heads/guacbot/translation-pipeline'
runs-on: ubuntu-latest
steps:

Expand Down

0 comments on commit 5006aa1

Please sign in to comment.