summaryrefslogtreecommitdiff
path: root/.github/workflows/build-containers.yml
diff options
context:
space:
mode:
authorWouter Deconinck <wdconinc@gmail.com>2024-11-25 03:20:58 -0600
committerGitHub <noreply@github.com>2024-11-25 10:20:58 +0100
commitf1faf31735a7540188f34b6d374f5c6ed926dcb5 (patch)
tree22197b078804c7403526ad67cc6785a91fe0c1c9 /.github/workflows/build-containers.yml
parent8957ef0df54683c956b476b1d54b4dc517b7be96 (diff)
downloadspack-f1faf31735a7540188f34b6d374f5c6ed926dcb5.tar.gz
spack-f1faf31735a7540188f34b6d374f5c6ed926dcb5.tar.bz2
spack-f1faf31735a7540188f34b6d374f5c6ed926dcb5.tar.xz
spack-f1faf31735a7540188f34b6d374f5c6ed926dcb5.zip
build-containers: determine latest release tag and push that as latest (#47742)
Diffstat (limited to '.github/workflows/build-containers.yml')
-rw-r--r--.github/workflows/build-containers.yml7
1 files changed, 7 insertions, 0 deletions
diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml
index eb7e7b0792..e49c98029d 100644
--- a/.github/workflows/build-containers.yml
+++ b/.github/workflows/build-containers.yml
@@ -57,6 +57,12 @@ jobs:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+ - name: Determine latest release tag
+ id: latest
+ run: |
+ git fetch --quiet --tags
+ echo "tag=$(git tag --list --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)" | tee -a $GITHUB_OUTPUT
+
- uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96
id: docker_meta
with:
@@ -71,6 +77,7 @@ jobs:
type=semver,pattern={{major}}
type=ref,event=branch
type=ref,event=pr
+ type=raw,value=latest,enable=${{ github.ref == format('refs/tags/{0}', steps.latest.outputs.tag) }}
- name: Generate the Dockerfile
env: