From ff77519ea972785bd38209fc1f8b9e2a098b8dd8 Mon Sep 17 00:00:00 2001 From: Ralksta <16941050+ralksta@users.noreply.github.com> Date: Sun, 31 May 2026 10:13:53 +0200 Subject: [PATCH] feat: release automation and doc fixes (#238) * fix: align env vars and config paths in CI and contributing docs * feat: add automatic docker publishing to ghcr workflow --------- Co-authored-by: ralksta --- .github/workflows/ci.yml | 2 +- .github/workflows/docker-publish.yml | 57 ++++++++++++++++++++++++++++ CONTRIBUTING.md | 5 ++- 3 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/docker-publish.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96cf110..ed54815 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,6 +39,6 @@ jobs: run: npm run build env: # Minimal env vars so Next.js build doesn't bail early on env validation - IMMICH_URL: http://localhost:2283 + IMMICH_API_URL: http://localhost:2283 IMMICH_API_KEY: placeholder-key-for-ci AUTH_SECRET: placeholder-secret-for-ci-builds-must-be-32-chars-long diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..6d222d7 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,57 @@ +name: Publish Docker Image + +on: + release: + types: [published] + workflow_dispatch: + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=ref,event=branch + type=sha,format=long + type=raw,value=latest,enable=${{ github.event_name == 'release' }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ id.meta.outputs.tags }} + labels: ${{ id.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2d94243..4d0f2a8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,8 +20,9 @@ cd immich-folio npm install # 3. Configure -cp content/gallery.example.yaml content/gallery.yaml -# Edit .env or set IMMICH_URL + IMMICH_API_KEY +cp .env.local.example .env.local +cp content/gallery.yaml.example content/gallery.yaml +# Edit .env.local or set IMMICH_API_URL + IMMICH_API_KEY # 4. Run npm run dev # http://localhost:3000