From a4f7b268af0543a4cb644e7bd0348e1c76661657 Mon Sep 17 00:00:00 2001 From: Ajinkya Date: Tue, 12 Nov 2024 14:47:18 +0530 Subject: [PATCH] added concurrency control for staging workflow --- .github/workflows/staging.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 580b82e492..02920d5ba9 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -3,10 +3,14 @@ name: Staging # Controls when the workflow will run on: push: - branches: [ master ] + branches: [master] pull_request: workflow_dispatch: +concurrency: + group: "staging${{ github.head_ref }}" + cancel-in-progress: true + jobs: build: runs-on: ubuntu-latest @@ -16,12 +20,12 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-java@v2 with: - distribution: 'adopt' - java-version: '8' + distribution: "adopt" + java-version: "8" architecture: x64 - uses: actions/setup-node@v2 with: - node-version: '17' + node-version: "17" - name: Convert github branch name to be compatible with docker tag name convention and generate tag name id: docker_tag run: echo "IMAGE_TAG=a-$(echo ${{ github.ref_name }} | sed 's/[^a-zA-Z0-9]/-/g')" >> $GITHUB_OUTPUT