diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 435bb73..70ba7c7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,6 @@ name: Release image -# Publishes ghcr.io//tipsarr when a version tag is pushed, e.g. `git tag v0.1.0 && git push --tags`. +# Publishes ghcr.io//tipsarr and ghcr.io//tipsarr-demo (public demo, Dockerfile.demo) when a version tag is pushed, e.g. `git tag v0.1.0 && git push --tags`. # The image carries an SBOM and SLSA provenance attestations and is signed with keyless cosign (see SECURITY.md). on: push: @@ -14,6 +14,13 @@ permissions: jobs: image: runs-on: ubuntu-latest + strategy: + matrix: + include: + - name: tipsarr + file: Dockerfile + - name: tipsarr-demo + file: Dockerfile.demo steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 @@ -26,7 +33,7 @@ jobs: - id: meta uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0 with: - images: ghcr.io/${{ github.repository_owner }}/tipsarr + images: ghcr.io/${{ github.repository_owner }}/${{ matrix.name }} tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} @@ -35,17 +42,18 @@ jobs: uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0 with: context: . + file: ${{ matrix.file }} platforms: linux/amd64,linux/arm64 build-args: VERSION=${{ steps.meta.outputs.version }} push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: type=gha,scope=${{ matrix.name }} + cache-to: type=gha,mode=max,scope=${{ matrix.name }} sbom: true provenance: mode=max - name: Sign the image (keyless) env: DIGEST: ${{ steps.build.outputs.digest }} - IMAGE: ghcr.io/${{ github.repository_owner }}/tipsarr + IMAGE: ghcr.io/${{ github.repository_owner }}/${{ matrix.name }} run: cosign sign --yes "${IMAGE,,}@${DIGEST}"