Skip to content

Commit

Permalink
chore(ci): Use concurrency instead of third party action, main runs a…
Browse files Browse the repository at this point in the history
…ll jobs
  • Loading branch information
krystofwoldrich committed Oct 21, 2024
1 parent 48d577d commit 99848d9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 32 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

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

env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
Expand All @@ -19,16 +19,6 @@ jobs:
diff_check:
uses: ./.github/workflows/skip-ci.yml

cancel-previous-workflow:
runs-on: ubuntu-latest
needs: [diff_check]
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # pin@0.12.1
with:
access_token: ${{ github.token }}

metrics:
runs-on: ${{ matrix.runs-on }}
needs: [diff_check]
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/native-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,14 @@ on:
- release/**
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
diff_check:
uses: ./.github/workflows/skip-ci.yml

cancel-previous-workflow:
runs-on: ubuntu-latest
needs: [diff_check]
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # pin@0.12.1
with:
access_token: ${{ github.token }}

test-ios:
name: ios
runs-on: macos-14 # uses m1 https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available/
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/sample-application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

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

env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
Expand All @@ -19,16 +19,6 @@ jobs:
diff_check:
uses: ./.github/workflows/skip-ci.yml

cancel-previous-workflow:
runs-on: ubuntu-latest
needs: [diff_check]
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # pin@0.12.1
with:
access_token: ${{ github.token }}

build:
name: Build ${{ matrix.rn-architecture }} ${{ matrix.platform }} ${{ matrix.build-type }} ${{ matrix.ios-use-frameworks}}
runs-on: ${{ matrix.runs-on }}
Expand Down

0 comments on commit 99848d9

Please sign in to comment.