krz/skunky-art

Alternative privacy frontend for DeviantArt.

clone: git clone https://gitbay.org/krz/skunky-art.git

v1.3.5: .github/workflows/release.yml · raw

 1name: Release image
 2
 3on:
 4  push:
 5    tags:
 6      - "v*"
 7  workflow_dispatch:
 8
 9env:
10  REGISTRY: ghcr.io
11  IMAGE_NAME: ${{ github.repository }}
12
13jobs:
14  publish:
15    runs-on: ubuntu-latest
16    permissions:
17      contents: read
18      packages: write
19      id-token: write
20      attestations: write
21    steps:
22      - name: Checkout
23        uses: actions/checkout@v4
24
25      # The Dockerfile cross-compiles with Go's GOOS/GOARCH from $BUILDPLATFORM,
26      # so no QEMU emulation is needed for the arm64 image.
27      - name: Set up Buildx
28        uses: docker/setup-buildx-action@v3
29
30      - name: Log in to ${{ env.REGISTRY }}
31        uses: docker/login-action@v3
32        with:
33          registry: ${{ env.REGISTRY }}
34          username: ${{ github.actor }}
35          password: ${{ secrets.GITHUB_TOKEN }}
36
37      - name: Derive tags and labels
38        id: meta
39        uses: docker/metadata-action@v5
40        with:
41          images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
42          # A semver tag v1.3.4 publishes 1.3.4, 1.3, 1 and latest.
43          # A manual run from a branch publishes only that branch name, so
44          # dispatching from main never moves the latest tag.
45          tags: |
46            type=semver,pattern={{version}}
47            type=semver,pattern={{major}}.{{minor}}
48            type=semver,pattern={{major}}
49            type=ref,event=branch
50          labels: |
51            org.opencontainers.image.title=SkunkyArt
52            org.opencontainers.image.description=An alternative frontend for DeviantArt that works entirely without JavaScript
53
54      - name: Build and push
55        id: build
56        uses: docker/build-push-action@v6
57        with:
58          context: .
59          platforms: linux/amd64,linux/arm64
60          push: true
61          tags: ${{ steps.meta.outputs.tags }}
62          labels: ${{ steps.meta.outputs.labels }}
63          cache-from: type=gha
64          cache-to: type=gha,mode=max
65
66      - name: Attest build provenance
67        uses: actions/attest-build-provenance@v2
68        with:
69          subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
70          subject-digest: ${{ steps.build.outputs.digest }}
71          push-to-registry: true