Skip to content

Commit

Permalink
GH: Publish docker images with semver labels
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgenpt committed Jul 11, 2023
1 parent af19c89 commit 1d190d1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/publish_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Publish Docker images
on:
push:
branches:
- '*'
- "*"
tags:
- 'v*'
- "v*"

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -37,6 +37,12 @@ jobs:
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# Set up semantic versioning for docker labels
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
# Best efforts to the contrary, I can't get GitHub to recognize the
# dual licensing even though it's a valid SPX ID, so force it here.
labels: |
Expand All @@ -54,4 +60,4 @@ jobs:
platforms: linux/amd64,linux/arm64
# Disable build attestations, because it confuses ghcr's UI
provenance: false
sbom: false
sbom: false

0 comments on commit 1d190d1

Please sign in to comment.