Skip to content

Commit 6ffa59a

Browse files
chore(ci): Use concurrency instead of third party action, main runs all jobs (#4195)
1 parent 48d577d commit 6ffa59a

File tree

5 files changed

+14
-32
lines changed

5 files changed

+14
-32
lines changed

.github/workflows/buildandtest.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
- release/**
99
pull_request:
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
14+
1115
jobs:
1216
diff_check:
1317
uses: ./.github/workflows/skip-ci.yml

.github/workflows/codegen.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
- release/**
99
pull_request:
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
14+
1115
jobs:
1216
diff_check:
1317
uses: ./.github/workflows/skip-ci.yml

.github/workflows/e2e.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
concurrency:
1212
group: ${{ github.workflow }}-${{ github.ref }}
13-
cancel-in-progress: true
13+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1414

1515
env:
1616
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
@@ -19,16 +19,6 @@ jobs:
1919
diff_check:
2020
uses: ./.github/workflows/skip-ci.yml
2121

22-
cancel-previous-workflow:
23-
runs-on: ubuntu-latest
24-
needs: [diff_check]
25-
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
26-
steps:
27-
- name: Cancel Previous Runs
28-
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # [email protected]
29-
with:
30-
access_token: ${{ github.token }}
31-
3222
metrics:
3323
runs-on: ${{ matrix.runs-on }}
3424
needs: [diff_check]

.github/workflows/native-tests.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,14 @@ on:
88
- release/**
99
pull_request:
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
14+
1115
jobs:
1216
diff_check:
1317
uses: ./.github/workflows/skip-ci.yml
1418

15-
cancel-previous-workflow:
16-
runs-on: ubuntu-latest
17-
needs: [diff_check]
18-
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
19-
steps:
20-
- name: Cancel Previous Runs
21-
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # [email protected]
22-
with:
23-
access_token: ${{ github.token }}
24-
2519
test-ios:
2620
name: ios
2721
runs-on: macos-14 # uses m1 https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available/

.github/workflows/sample-application.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.ref }}
12-
cancel-in-progress: true
12+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1313

1414
env:
1515
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
@@ -19,16 +19,6 @@ jobs:
1919
diff_check:
2020
uses: ./.github/workflows/skip-ci.yml
2121

22-
cancel-previous-workflow:
23-
runs-on: ubuntu-latest
24-
needs: [diff_check]
25-
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
26-
steps:
27-
- name: Cancel Previous Runs
28-
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # [email protected]
29-
with:
30-
access_token: ${{ github.token }}
31-
3222
build:
3323
name: Build ${{ matrix.rn-architecture }} ${{ matrix.platform }} ${{ matrix.build-type }} ${{ matrix.ios-use-frameworks}}
3424
runs-on: ${{ matrix.runs-on }}

0 commit comments

Comments
 (0)