Claude bd5392840a
fix: address reviewer comments on Docker image name and README
- Fix GHCR image name to use explicit lowercase (ghcr.io/maronato/go-finger)
  instead of ${{ github.repository }} which may contain uppercase characters
  and fail Docker registry validation
- Fix README typo: "locahost" -> "localhost"
- Fix README development section: "./finger serve" -> "./go-finger serve"

https://claude.ai/code/session_01WSTmBCLVtmPMFqxCnjM9fh
2026-03-08 03:47:18 +00:00

74 lines
2.4 KiB
YAML

name: Release
# Controls when the workflow will run
on:
workflow_dispatch:
release:
types:
- published
jobs:
buildpush:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- # Get the repository's code
name: Checkout
uses: actions/checkout@v4
- # https://github.com/docker/setup-qemu-action
name: Set up QEMU
uses: docker/setup-qemu-action@v3
- # https://github.com/docker/setup-buildx-action
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- # https://github.com/docker/metadata-action
# Generate tags and labels for the image
# according to the commit and the branch
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/maronato/go-finger
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable=${{ github.event_name == 'release' }}
- # https://github.com/actions/cache
name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- # https://github.com/docker/build-push-action
name: Build and push
uses: docker/build-push-action@v5
with:
context: .
build-args: |
VERSION=${{ steps.meta.outputs.version }}
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- # Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache