Skip to content

Commit

Permalink
Merge automatically cancelling earlier actions on the same branch
Browse files Browse the repository at this point in the history
This updates the Github Actions to only run the last state of a PR, except for master and develop.

Related PR: #882
  • Loading branch information
upsj authored Feb 16, 2022
2 parents 7048448 + 0f23f6c commit fc6322b
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/abidiff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ popd

bot_delete_comments_matching "Note: This PR changes the Ginkgo ABI"

abidiff build-old/lib/libginkgod.so build-new/lib/libginkgod.so &> abi.diff || (bot_comment "Note: This PR changes the Ginkgo ABI:\n\`\`\`\n$(head -n2 abi.diff | tr '\n' ';' | sed 's/;/\\n/g')\`\`\`\nFor details check the full ABI diff under **Artifacts** [here]($JOB_URL)" && false)
abidiff build-old/lib/libginkgod.so build-new/lib/libginkgod.so &> abi.diff || (bot_comment "Note: This PR changes the Ginkgo ABI:\n\`\`\`\n$(head -n2 abi.diff | tr '\n' ';' | sed 's/;/\\n/g')\`\`\`\nFor details check the full ABI diff under **Artifacts** [here]($JOB_URL)")
1 change: 0 additions & 1 deletion .github/workflows/bot-pr-created.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
on:
pull_request_target:
types: [opened]

name: OnNewPR
jobs:
label:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/bot-pr-updated.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
on:
pull_request_target:
types: [opened,synchronize]

name: OnSyncPR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-format:
runs-on: ubuntu-18.04
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,25 @@ name: OSX-build

on:
push:
branches:
- 'master'
- 'develop'
- 'release/**'
tags:
- '**'
pull_request:
types: [opened,synchronize]
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false

concurrency:
group: ${{ github.workflow }}-${{ (github.head_ref && github.ref) || github.run_id }}
cancel-in-progress: true

jobs:
osx-clang-omp:
strategy:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/windows-cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,25 @@ name: Windows-Cygwin

on:
push:
branches:
- 'master'
- 'develop'
- 'release/**'
tags:
- '**'
pull_request:
types: [opened,synchronize]
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false

concurrency:
group: ${{ github.workflow }}-${{ (github.head_ref && github.ref) || github.run_id }}
cancel-in-progress: true

jobs:
windows_cygwin:
strategy:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/windows-mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,25 @@ name: Windows-MinGW

on:
push:
branches:
- 'master'
- 'develop'
- 'release/**'
tags:
- '**'
pull_request:
types: [opened,synchronize]
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false

concurrency:
group: ${{ github.workflow }}-${{ (github.head_ref && github.ref) || github.run_id }}
cancel-in-progress: true

jobs:
windows_mingw:
strategy:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/windows-msvc-cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,25 @@ name: Windows-MSVC-CUDA (compile-only)

on:
push:
branches:
- 'master'
- 'develop'
- 'release/**'
tags:
- '**'
pull_request:
types: [opened,synchronize]
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false

concurrency:
group: ${{ github.workflow }}-${{ (github.head_ref && github.ref) || github.run_id }}
cancel-in-progress: true

jobs:
windows_cuda:
strategy:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/windows-msvc-ref.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,25 @@ name: Windows-MSVC-Reference

on:
push:
branches:
- 'master'
- 'develop'
- 'release/**'
tags:
- '**'
pull_request:
types: [opened,synchronize]
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false

concurrency:
group: ${{ github.workflow }}-${{ (github.head_ref && github.ref) || github.run_id }}
cancel-in-progress: true

jobs:
windows_ref:
strategy:
Expand Down

0 comments on commit fc6322b

Please sign in to comment.