From 1babdb03eea1c2a2d65b79150b9c6c64c0159a5c Mon Sep 17 00:00:00 2001 From: DQ Date: Tue, 20 Aug 2024 20:37:16 +0200 Subject: [PATCH] [CI] Cancel in progress jobs (plus readonly permissions) (#65) Co-authored-by: Domenic Quirl --- .github/workflows/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b4f3d9a..57a86fb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,6 +10,15 @@ on: # Allows to run this workflow manually from the Actions tab workflow_dispatch: + +permissions: + contents: read + +# If new code is pushed to a PR branch, then cancel in progress workflows for that PR. Ensures that +# we don't waste CI time, and returns results quicker https://github.com/jonhoo/rust-ci-conf/pull/5 +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true env: RUST_LOG: info