Add concurrency limits to artifact publication workflow #321
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adapted from https://github.com/stackhpc/azimuth/blob/master/.github/workflows/build-push-artifacts.yaml | |
name: Publish artifacts | |
on: | |
# Publish artifacts on every push to master and every tag | |
push: | |
branches: | |
- main | |
tags: | |
- "*" | |
# Use the head ref for workflow concurrency, with cancellation | |
# This should mean that any previous workflows for a PR get cancelled when a new commit is pushed | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
publish_images: | |
uses: ./.github/workflows/build-push-images.yml | |
with: | |
ref: ${{ github.ref }} | |
secrets: inherit | |
publish_charts: | |
needs: [publish_images] | |
uses: ./.github/workflows/build-push-charts.yml | |
with: | |
ref: ${{ github.ref }} | |
secrets: inherit |