From 7a9d6caaa9f9b3e8fcbad6bfaf9e5b5ac43aeafe Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 7 Feb 2024 01:03:54 +0100 Subject: [PATCH] ci.yml: add automatic cancellation of current builds if new commits are pushed, and tighten permissions (#1043) --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f142e9bc3..5ef5ef60b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,13 @@ on: paths-ignore: - '**.md' +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +permissions: + contents: read # to fetch code (actions/checkout) + env: CCACHE_BASEDIR: ${{ github.workspace }} CCACHE_DIR: ${{ github.workspace }}/.ccache