From 6030c2f6e58758e2c9ea9380cb3858fd6b0739e7 Mon Sep 17 00:00:00 2001 From: Daven Quinn Date: Sat, 25 May 2024 03:19:52 -0500 Subject: [PATCH] Small update to workflow --- .github/workflows/build-image.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index 50383f4a..498a7a74 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -4,7 +4,7 @@ on: push: branches: ["main"] tags: - - v[0-9]+.[0-9]+.[0-9]+ # Semver Release + - v[0-9]+.[0-9]+.[0-9]+ # Semver Release (non-prerelease) pull_request: branches: [main] @@ -21,16 +21,19 @@ jobs: uses: docker/metadata-action@v4 with: images: hub.opensciencegrid.org/macrostrat/web - # New: apply the 'latest' tag to tagged releases on the default branch + # New: apply the 'latest' tag to non-prerelease semver tags tags: | type=raw,value=sha-{{sha}} type=raw,value=latest-itb + type=match,value=latest,pattern=v\d+.\d+.\d+ type=raw,value=latest-itb-{{date 'YYYYMMDDHHmmss'}} type=ref,event=pr,suffix=-{{date 'YYYYMMDDHHmmss'}} type=ref,event=branch,suffix=-{{date 'YYYYMMDDHHmmss'}} type=ref,event=tag,suffix=-{{date 'YYYYMMDDHHmmss'}} type=semver,pattern={{version}} - type=semver,value=latest,enable={{is_default_branch}} + type=semver,pattern={{version}}-{{date 'YYYYMMDDHHmmss'}} + flavor: | + latest=false - name: Set up Docker BuildX uses: docker/setup-buildx-action@v2 - name: Login to OSG DockerHub