diff --git a/.github/workflows/build-plugin-zip.yml b/.github/workflows/build-plugin-zip.yml index e2707e81f5d7c..9d376e0ea6e2f 100644 --- a/.github/workflows/build-plugin-zip.yml +++ b/.github/workflows/build-plugin-zip.yml @@ -10,6 +10,13 @@ on: description: 'rc or stable?' required: true +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + jobs: bump-version: name: Bump version diff --git a/.github/workflows/bundle-size.yml b/.github/workflows/bundle-size.yml index f6111b9fb4932..cd3f591a04910 100644 --- a/.github/workflows/bundle-size.yml +++ b/.github/workflows/bundle-size.yml @@ -2,6 +2,13 @@ name: Compressed Size on: [pull_request] +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + jobs: build: name: Check diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 919a8a4691db8..0000000000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Cancel -on: pull_request -jobs: - cancel: - name: 'Cancel Previous Runs' - runs-on: ubuntu-latest - timeout-minutes: 3 - steps: - - name: Get all workflow ids and set to env variable - run: echo "WORKFLOW_IDS_TO_CANCEL=$(curl https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/workflows -s | jq -r '.workflows | map(.id|tostring) | join(",")')" >> $GITHUB_ENV - - - uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d # v0.8.0 - with: - workflow_id: ${{ env.WORKFLOW_IDS_TO_CANCEL }} - access_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/create-block.yml b/.github/workflows/create-block.yml index 435c418a86139..76a11ff6ad69b 100644 --- a/.github/workflows/create-block.yml +++ b/.github/workflows/create-block.yml @@ -5,6 +5,13 @@ on: push: branches: [trunk, wp/trunk] +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + jobs: checks: name: Checks diff --git a/.github/workflows/end2end-test.yml b/.github/workflows/end2end-test.yml index 97faf7f5a183d..a6ab7b73e85a0 100644 --- a/.github/workflows/end2end-test.yml +++ b/.github/workflows/end2end-test.yml @@ -8,6 +8,13 @@ on: - 'release/**' - 'wp/**' +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + jobs: admin: name: Admin - ${{ matrix.part }} diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index f438981e6125f..649f9155ad5e8 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -5,6 +5,13 @@ on: release: types: [published] +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + jobs: performance: name: Run performance tests diff --git a/.github/workflows/rnmobile-android-runner.yml b/.github/workflows/rnmobile-android-runner.yml index 6fa1009201bc6..e6404c3420859 100644 --- a/.github/workflows/rnmobile-android-runner.yml +++ b/.github/workflows/rnmobile-android-runner.yml @@ -5,6 +5,13 @@ on: push: branches: [trunk] +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + jobs: test: runs-on: macos-latest diff --git a/.github/workflows/rnmobile-ios-runner.yml b/.github/workflows/rnmobile-ios-runner.yml index 36584173a0cca..971ef150e0126 100644 --- a/.github/workflows/rnmobile-ios-runner.yml +++ b/.github/workflows/rnmobile-ios-runner.yml @@ -5,6 +5,13 @@ on: push: branches: [trunk] +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + jobs: test: runs-on: macos-latest diff --git a/.github/workflows/static-checks.yml b/.github/workflows/static-checks.yml index a5bc053d4c8e2..32508611082d6 100644 --- a/.github/workflows/static-checks.yml +++ b/.github/workflows/static-checks.yml @@ -8,6 +8,13 @@ on: - 'release/**' - 'wp/**' +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + jobs: check: name: All diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 87a598a1646e4..d5d4b06c6bcfd 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -10,6 +10,13 @@ on: - 'release/**' - 'wp/**' +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + jobs: unit-js: name: JavaScript