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 <ralksta@users.noreply.github.com>
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -39,6 +39,6 @@ jobs:
|
|||||||
run: npm run build
|
run: npm run build
|
||||||
env:
|
env:
|
||||||
# Minimal env vars so Next.js build doesn't bail early on env validation
|
# 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
|
IMMICH_API_KEY: placeholder-key-for-ci
|
||||||
AUTH_SECRET: placeholder-secret-for-ci-builds-must-be-32-chars-long
|
AUTH_SECRET: placeholder-secret-for-ci-builds-must-be-32-chars-long
|
||||||
|
|||||||
57
.github/workflows/docker-publish.yml
vendored
Normal file
57
.github/workflows/docker-publish.yml
vendored
Normal file
@@ -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
|
||||||
@@ -20,8 +20,9 @@ cd immich-folio
|
|||||||
npm install
|
npm install
|
||||||
|
|
||||||
# 3. Configure
|
# 3. Configure
|
||||||
cp content/gallery.example.yaml content/gallery.yaml
|
cp .env.local.example .env.local
|
||||||
# Edit .env or set IMMICH_URL + IMMICH_API_KEY
|
cp content/gallery.yaml.example content/gallery.yaml
|
||||||
|
# Edit .env.local or set IMMICH_API_URL + IMMICH_API_KEY
|
||||||
|
|
||||||
# 4. Run
|
# 4. Run
|
||||||
npm run dev # http://localhost:3000
|
npm run dev # http://localhost:3000
|
||||||
|
|||||||
Reference in New Issue
Block a user