From 405e591bdfd4758b7cbc4c290bcc04fe6d08f813 Mon Sep 17 00:00:00 2001 From: Pranay Valson Date: Thu, 2 Jan 2025 21:44:47 +0530 Subject: [PATCH] cancel previous ci/cd run if exists Signed-off-by: Pranay Valson --- .github/workflows/docker-ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 5cd6cfd..233fdc0 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -3,16 +3,20 @@ name: docker-ci on: push: branches: - - "main" + - "main" pull_request: - branches: - - "main" - - "develop" + branches: + - "main" + - "develop" jobs: build: runs-on: ubuntu-latest steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.6.0 + with: + access_token: ${{ secrets.GITHUB_TOKEN }} - name: Login to Artifact Registry/GCR uses: docker/login-action@v2 with: