Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
add latest/edge tag logic
Browse files Browse the repository at this point in the history
  • Loading branch information
hanstrompert committed Apr 4, 2023
1 parent 3373f1d commit 11cc22c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build-push-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ jobs:
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# Override latest tag to make it so that:
# 'latest' -> last release
# 'edge' -> last release or pre-release
flavor: |
latest=false
tags: |
type=schedule,pattern=nightly,priority=1000
type=ref,event=branch,priority=600
type=ref,event=tag,priority=600
type=ref,event=pr,prefix=pr-,priority=600
type=raw,value=latest,enable=${{ github.event.release.prerelease == false }},priority=410
type=raw,value=edge,enable=true,priority=400
- name: Build and push Docker image
uses: docker/build-push-action@v4
Expand All @@ -43,3 +55,5 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}

0 comments on commit 11cc22c

Please sign in to comment.