name: Release # Tagging is the release trigger: semver tags only, so a stray tag does not publish. on: push: tags: ["v[0-9]+.[0-9]+.[0-9]+*"] permissions: contents: read packages: write jobs: image: name: Build and publish image runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: docker/setup-qemu-action@v3 - uses: docker/setup-buildx-action@v3 - uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - id: meta uses: docker/metadata-action@v5 with: images: ghcr.io/${{ github.repository }} # v1.4.2 publishes 1.4.2, 1.4 and 1 — so a Rune pinned to :1 gets # patches without ever crossing a major version. tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} type=raw,value=latest # arm64 is not optional: a homelab is as likely to be a Raspberry Pi or an # Apple silicon VM as it is to be an x86 box. - uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | VERSION=${{ github.ref_name }} cache-from: type=gha cache-to: type=gha,mode=max