From a4c24f9dc57e00a46a586c2853e7a6e8fc26752e Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 14 Oct 2022 01:52:31 +0900 Subject: [PATCH] ci: footprint: Use "concurrency" to cancel previous runs This commit adds a concurrency group to the workflow in order to ensure that only one instance of the workflow runs for an event-ref combination. Signed-off-by: Stephanos Ioannidis --- .github/workflows/footprint.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/footprint.yml b/.github/workflows/footprint.yml index b1fc8003a3c..4f2ecd02aa5 100644 --- a/.github/workflows/footprint.yml +++ b/.github/workflows/footprint.yml @@ -2,19 +2,14 @@ name: Footprint Delta on: pull_request +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + jobs: - footprint-cancel: - runs-on: ubuntu-20.04 - if: github.repository == 'zephyrproject-rtos/zephyr' - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - access_token: ${{ github.token }} footprint-delta: runs-on: ubuntu-20.04 if: github.repository == 'zephyrproject-rtos/zephyr' - needs: footprint-cancel container: image: ghcr.io/zephyrproject-rtos/ci:v0.24.5 options: '--entrypoint /bin/bash' @@ -24,11 +19,6 @@ jobs: ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.15.1 ZEPHYR_TOOLCHAIN_VARIANT: zephyr steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - access_token: ${{ github.token }} - - name: Apply container owner mismatch workaround run: | # FIXME: The owner UID of the GITHUB_WORKSPACE directory may not