Skip to content

Commit

Permalink
fix: workflows not run on main
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas committed Oct 21, 2023
1 parent 671ea82 commit a61da0d
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 31 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/analysis-sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ env:
VCPKG_BINARY_SOURCES: clear;default,readwrite

jobs:
cancel-runs:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

sonarcloud:
name: SonarCloud
runs-on: ubuntu-22.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

jobs:
cancel-runs:
if: github.ref != 'refs/heads/main'
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:

jobs:
cancel-runs:
if: github.ref != 'refs/heads/main'
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-windows-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
MAKEFLAGS: '-j 2'
jobs:
cancel-runs:
if: github.ref != 'refs/heads/main'
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-windows-solution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:

jobs:
cancel-runs:
if: github.ref != 'refs/heads/main'
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/clang-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- 'src/**'
jobs:
cancel-runs:
if: github.ref != 'refs/heads/main'
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
Expand All @@ -20,13 +20,6 @@ jobs:
build:
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: Set up Git
if: ${{ github.ref != 'refs/heads/main' }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cron-stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
cancel-runs:
if: github.ref != 'refs/heads/main'
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@ on:
- pull_request_target

jobs:
cancel-runs:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

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

0 comments on commit a61da0d

Please sign in to comment.