Skip to content

Google SSO fixes

Google SSO fixes #27

name: Build and publish image
# Builds the multi-arch container image and pushes it to GitHub Container
# Registry. The published image lets self-hosters skip the `git clone`
# step entirely:
#
# docker run -d -p 3825:3825 -v vitriol-data:/data \
# ghcr.io/<owner>/vitriol:latest
#
# Tagging strategy:
# - every push to main → `latest` and `main-<short-sha>`
# - git tags like v1.2.3 → `v1.2.3`, `1.2`, `1`, `latest`
# The action runs entirely against the repo's GITHUB_TOKEN — no extra
# secrets or credentials needed in the repo settings.
on:
push:
branches: [main]
tags: ["v*.*.*"]
workflow_dispatch:
env:
REGISTRY: ghcr.io
# Lower-case repo path — GHCR rejects mixed-case names. We compute it
# at runtime so a repo rename doesn't break the workflow.
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU (for arm64 emulation on amd64 runners)
uses: docker/setup-qemu-action@v3
- name: Set up Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Lower-case image name
id: imgname
run: echo "name=${IMAGE_NAME,,}" >> "$GITHUB_OUTPUT"
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ steps.imgname.outputs.name }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=sha,format=short,prefix=main-,enable={{is_default_branch}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
labels: |
org.opencontainers.image.title=Vitriol
org.opencontainers.image.description=File converter web app with Philosopher's Stone steganographic mode.
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
org.opencontainers.image.licenses=MIT
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
# Multi-arch — amd64 covers most cloud / Coolify deploys; arm64
# covers Apple Silicon dev machines, Raspberry Pi self-hosters,
# Hetzner CAX, Oracle Cloud A1 free tier, AWS Graviton. Doubles
# GHCR storage but it's free for public packages and the wider
# compatibility matters more than the disk cost.
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max