Skip to content

Release

Release #5

Workflow file for this run

name: Release
on:
release:
types:
- published
jobs:
publish:
permissions:
attestations: write
id-token: write
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: meta
uses: docker/metadata-action@v5
with:
images: "ghcr.io/${{ github.actor }}/gluetun"
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: shortcommit
run: echo "::set-output name=value::$(git rev-parse --short HEAD)"
- uses: docker/build-push-action@v6
id: push
with:
build-args: |
CREATED=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
COMMIT=${{ steps.shortcommit.outputs.value }}
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
cache-from: type=gha
cache-to: type=gha,mode=max
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
- uses: actions/attest-build-provenance@v1
with:
subject-name: "ghcr.io/${{ github.actor }}/gluetun"
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true