From ce113234d0963714d5b2334ba3ceebb5ab2cbf30 Mon Sep 17 00:00:00 2001 From: Lee Watson Date: Sat, 31 Aug 2024 02:26:38 +0100 Subject: [PATCH] Cancel previous workflows on update --- .github/workflows/build-docker-image.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 298462d..6642d5c 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -3,14 +3,18 @@ name: Build and push Docker image on: push: branches: - - 'main' + - "main" tags: - - 'v*' + - "v*" pull_request: branches: - - 'main' + - "main" workflow_call: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }}