Skip to content

Commit

Permalink
added concurrency control for staging workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ag060 committed Nov 12, 2024
1 parent 13e2e61 commit a4f7b26
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit a4f7b26

Please sign in to comment.