diff --git a/.github/workflows/Cancel.yml b/.github/workflows/Cancel.yml deleted file mode 100644 index 048d1e560..000000000 --- a/.github/workflows/Cancel.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Cancel - -on: - workflow_run: - workflows: - - "CI" - - "Documentation" - - "Format suggestions" - types: - - requested - -jobs: - cancel: - runs-on: ubuntu-latest - steps: - - uses: styfle/cancel-workflow-action@0.9.0 - with: - # cancel itself and all later-scheduled workflows, leaving only the latest - # helps if the pipeline is saturated - all_but_latest: true - workflow_id: ${{ github.event.workflow.id }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8eeb12b4b..de70c88f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,17 @@ name: CI + on: push: branches: - master pull_request: + +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: only if it is a pull request build. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + jobs: test: name: Julia ${{ matrix.version }} - ${{ matrix.group }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2b57c0c99..a339654a2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -7,6 +7,12 @@ on: tags: '*' pull_request: +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: only if it is a pull request build. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 3c9ec4f8d..f83b38f55 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -2,6 +2,12 @@ name: Format suggestions on: pull_request: + +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: only if it is a pull request build. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} jobs: format: