diff --git a/.github/workflows/cancel-duplicate-runs.yaml b/.github/workflows/cancel-duplicate-runs.yaml deleted file mode 100644 index 9f74360b034..00000000000 --- a/.github/workflows/cancel-duplicate-runs.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: Cancel -on: - workflow_run: - workflows: ["CI", "CI Additional", "CI Upstream"] - types: - - requested -jobs: - cancel: - name: Cancel previous runs - runs-on: ubuntu-latest - if: github.repository == 'pydata/xarray' - steps: - - uses: styfle/cancel-workflow-action@0.9.1 - with: - workflow_id: ${{ github.event.workflow.id }} diff --git a/.github/workflows/ci-additional.yaml b/.github/workflows/ci-additional.yaml index 3fbe1e2f460..2be3577d883 100644 --- a/.github/workflows/ci-additional.yaml +++ b/.github/workflows/ci-additional.yaml @@ -8,27 +8,14 @@ on: - "*" workflow_dispatch: # allows you to trigger manually +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: - skip-duplicate-jobs: - runs-on: ubuntu-latest - if: | - github.repository == 'pydata/xarray' - && (github.event_name == 'push' || github.event_name == 'pull_request') - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - id: skip_check - uses: fkirc/skip-duplicate-actions@v3.4.1 - with: - # For workflows which are triggered concurrently with the same - # contents, attempt to execute them exactly once. - concurrent_skipping: 'same_content_newer' - paths_ignore: '["**/doc/**"]' detect-ci-trigger: name: detect ci trigger runs-on: ubuntu-latest - needs: skip-duplicate-jobs - if: ${{ needs.skip-duplicate-jobs.outputs.should_skip != 'true' }} outputs: triggered: ${{ steps.detect-trigger.outputs.trigger-found }} steps: @@ -129,8 +116,6 @@ jobs: doctest: name: Doctests runs-on: "ubuntu-latest" - needs: skip-duplicate-jobs - if: ${{ needs.skip-duplicate-jobs.outputs.should_skip != 'true' }} defaults: run: shell: bash -l {0} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 74603d4398f..c11842bbb04 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,27 +8,13 @@ on: - "*" workflow_dispatch: # allows you to trigger manually -jobs: - skip-duplicate-jobs: - runs-on: ubuntu-latest - if: | - github.repository == 'pydata/xarray' - && (github.event_name == 'push' || github.event_name == 'pull_request') - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - id: skip_check - uses: fkirc/skip-duplicate-actions@v3.4.1 - with: - # For workflows which are triggered concurrently with the same - # contents, attempt to execute them exactly once. - concurrent_skipping: 'same_content_newer' - paths_ignore: '["**/doc/**"]' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: detect-ci-trigger: name: detect ci trigger - needs: skip-duplicate-jobs - if: ${{ needs.skip-duplicate-jobs.outputs.should_skip != 'true' }} runs-on: ubuntu-latest outputs: triggered: ${{ steps.detect-trigger.outputs.trigger-found }} @@ -125,8 +111,6 @@ jobs: event_file: name: "Event File" - needs: skip-duplicate-jobs - if: ${{ needs.skip-duplicate-jobs.outputs.should_skip != 'true' }} runs-on: ubuntu-latest steps: - name: Upload diff --git a/.github/workflows/upstream-dev-ci.yaml b/.github/workflows/upstream-dev-ci.yaml index 67415331bbd..f1ce442c623 100644 --- a/.github/workflows/upstream-dev-ci.yaml +++ b/.github/workflows/upstream-dev-ci.yaml @@ -10,6 +10,10 @@ on: - cron: "0 0 * * *" # Daily “At 00:00” UTC workflow_dispatch: # allows you to trigger the workflow run manually +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: detect-ci-trigger: name: detect upstream-dev ci trigger