From 16a2c2925eb46e24208b20bca567f1e7546f4e2f Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 8 Apr 2023 18:57:54 +0200 Subject: [PATCH] chore: automatically cancel superseded Actions runs (#5) --- .github/workflows/check.yml | 4 ++++ .github/workflows/nostd.yml | 4 ++++ .github/workflows/safety.yml | 4 ++++ .github/workflows/scheduled.yml | 4 ++++ .github/workflows/test.yml | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a687dfa..3fb97ad 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -4,6 +4,10 @@ on: push: branches: [main] pull_request: +# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5 +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true name: check jobs: fmt: diff --git a/.github/workflows/nostd.yml b/.github/workflows/nostd.yml index 7efae0f..32d56c3 100644 --- a/.github/workflows/nostd.yml +++ b/.github/workflows/nostd.yml @@ -4,6 +4,10 @@ on: push: branches: [main] pull_request: +# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5 +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true name: no-std jobs: nostd: diff --git a/.github/workflows/safety.yml b/.github/workflows/safety.yml index edf40e5..9c7aeee 100644 --- a/.github/workflows/safety.yml +++ b/.github/workflows/safety.yml @@ -4,6 +4,10 @@ on: push: branches: [main] pull_request: +# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5 +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true name: safety jobs: sanitizers: diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 0215432..d4e19dd 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -6,6 +6,10 @@ on: pull_request: schedule: - cron: '7 7 * * *' +# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5 +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true name: rolling jobs: # https://twitter.com/mycoliza/status/1571295690063753218 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c675b38..4d0417c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,6 +4,10 @@ on: push: branches: [main] pull_request: +# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5 +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true name: test jobs: required: