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

ci/cd: cancel previous workflows for same branch #1726

Merged
merged 5 commits into from
Oct 21, 2023
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
16 changes: 9 additions & 7 deletions .github/workflows/analysis-sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,20 @@
VCPKG_BINARY_SOURCES: clear;default,readwrite

jobs:
cancel-runs:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs

Check failure on line 26 in .github/workflows/analysis-sonarcloud.yml

View workflow job for this annotation

GitHub Actions / yamllint

[yamllint] .github/workflows/analysis-sonarcloud.yml#L26

[error] wrong indentation: expected 6 but found 4 (indentation)
Raw output
./.github/workflows/analysis-sonarcloud.yml:26:5: [error] wrong indentation: expected 6 but found 4 (indentation)
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

sonarcloud:
name: SonarCloud
runs-on: ubuntu-22.04

steps:
- name: Cancel Previous Runs
if: github.ref != 'refs/heads/main'
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: 'same_content'
cancel_others: true

- uses: actions/checkout@v3
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
with:
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,19 @@
- main

jobs:
cancel-runs:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs

Check failure on line 21 in .github/workflows/build-docker.yml

View workflow job for this annotation

GitHub Actions / yamllint

[yamllint] .github/workflows/build-docker.yml#L21

[error] wrong indentation: expected 6 but found 4 (indentation)
Raw output
./.github/workflows/build-docker.yml:21:5: [error] wrong indentation: expected 6 but found 4 (indentation)
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

build_docker_x86:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
if: github.ref != 'refs/heads/main'
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: 'same_content'
cancel_others: true

- name: Checkout
uses: actions/checkout@main
with:
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
MAKEFLAGS: '-j 2'

jobs:
cancel-runs:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs

Check failure on line 25 in .github/workflows/build-ubuntu.yml

View workflow job for this annotation

GitHub Actions / yamllint

[yamllint] .github/workflows/build-ubuntu.yml#L25

[error] wrong indentation: expected 6 but found 4 (indentation)
Raw output
./.github/workflows/build-ubuntu.yml:25:5: [error] wrong indentation: expected 6 but found 4 (indentation)
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

job:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
name: ${{ matrix.os }}-${{ matrix.buildtype }}
Expand All @@ -35,13 +44,6 @@
triplet: x64-linux

steps:
- name: Cancel Previous Runs
if: github.ref != 'refs/heads/main'
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: 'same_content'
cancel_others: true

- name: Checkout repository
uses: actions/checkout@main

Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/build-windows-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@
CMAKE_BUILD_PARALLEL_LEVEL: 2
MAKEFLAGS: '-j 2'
jobs:
cancel-runs:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs

Check failure on line 22 in .github/workflows/build-windows-cmake.yml

View workflow job for this annotation

GitHub Actions / yamllint

[yamllint] .github/workflows/build-windows-cmake.yml#L22

[error] wrong indentation: expected 6 but found 4 (indentation)
Raw output
./.github/workflows/build-windows-cmake.yml:22:5: [error] wrong indentation: expected 6 but found 4 (indentation)
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

job:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
name: ${{ matrix.os }}-${{ matrix.buildtype }}
Expand All @@ -29,13 +38,6 @@
packages: >
sccache
steps:
- name: Cancel Previous Runs
if: github.ref != 'refs/heads/main'
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: 'same_content'
cancel_others: true

- name: Checkout repository
uses: actions/checkout@main

Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/build-windows-solution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
MAKEFLAGS: '-j 2'

jobs:
cancel-runs:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs

Check failure on line 25 in .github/workflows/build-windows-solution.yml

View workflow job for this annotation

GitHub Actions / yamllint

[yamllint] .github/workflows/build-windows-solution.yml#L25

[error] wrong indentation: expected 6 but found 4 (indentation)
Raw output
./.github/workflows/build-windows-solution.yml:25:5: [error] wrong indentation: expected 6 but found 4 (indentation)
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

job:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
name: ${{ matrix.os }}-${{ matrix.buildtype }}
Expand All @@ -32,13 +41,6 @@
packages: >
sccache
steps:
- name: Cancel Previous Runs
if: github.ref != 'refs/heads/main'
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: 'same_content'
cancel_others: true

- name: Setup MSBuild.exe
uses: microsoft/[email protected]

Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/clang-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
paths:
- 'src/**'
jobs:
cancel-runs:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs

Check failure on line 15 in .github/workflows/clang-lint.yml

View workflow job for this annotation

GitHub Actions / yamllint

[yamllint] .github/workflows/clang-lint.yml#L15

[error] wrong indentation: expected 6 but found 4 (indentation)
Raw output
./.github/workflows/clang-lint.yml:15:5: [error] wrong indentation: expected 6 but found 4 (indentation)
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

build:
runs-on: ubuntu-latest
steps:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/cron-stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
- cron: '30 1 * * *'

jobs:
cancel-runs:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs

Check failure on line 12 in .github/workflows/cron-stale.yml

View workflow job for this annotation

GitHub Actions / yamllint

[yamllint] .github/workflows/cron-stale.yml#L12

[error] wrong indentation: expected 6 but found 4 (indentation)
Raw output
./.github/workflows/cron-stale.yml:12:5: [error] wrong indentation: expected 6 but found 4 (indentation)
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

stale:
runs-on: ubuntu-latest
steps:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
- pull_request_target

jobs:
cancel-runs:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs

Check failure on line 11 in .github/workflows/pr-labeler.yml

View workflow job for this annotation

GitHub Actions / yamllint

[yamllint] .github/workflows/pr-labeler.yml#L11

[error] wrong indentation: expected 6 but found 4 (indentation)
Raw output
./.github/workflows/pr-labeler.yml:11:5: [error] wrong indentation: expected 6 but found 4 (indentation)
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

triage:
runs-on: ubuntu-latest
steps:
Expand Down
Loading