From 99848d974d2ec794211778c407e1fe36cb19defa Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Mon, 21 Oct 2024 12:20:38 +0200 Subject: [PATCH] chore(ci): Use concurrency instead of third party action, main runs all jobs --- .github/workflows/e2e.yml | 12 +----------- .github/workflows/native-tests.yml | 14 ++++---------- .github/workflows/sample-application.yml | 12 +----------- 3 files changed, 6 insertions(+), 32 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 0f610ec55..1e7c25123 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -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 }} @@ -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] diff --git a/.github/workflows/native-tests.yml b/.github/workflows/native-tests.yml index e9e464ff5..5694143e6 100644 --- a/.github/workflows/native-tests.yml +++ b/.github/workflows/native-tests.yml @@ -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/ diff --git a/.github/workflows/sample-application.yml b/.github/workflows/sample-application.yml index be5d7ecc5..574e62c2d 100644 --- a/.github/workflows/sample-application.yml +++ b/.github/workflows/sample-application.yml @@ -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 }} @@ -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 }}