Files
bookhoard/.gitea/workflows/release.yml
T
john-okeefe e7c4c931ee
Release / build-and-push (push) Failing after 3m56s
ci(release): add tag-triggered image build & push to Gitea registry
Adds .gitea/workflows/release.yml. On a v* git tag push (or manual dispatch), builds the Dockerfile and publishes to git.linuxhg.com/bookhoard/bookhoard under two tags: the version (${{ gitea.ref_name }}) and 'latest'. Auth uses the auto-provided GITHUB_TOKEN; no secret to manage. Pushes to main do nothing, so work-in-progress commits never ship.
2026-07-29 16:53:43 -04:00

44 lines
1.3 KiB
YAML

name: Release
# Builds and publishes the Bookhoard container image to the Gitea container registry.
# Triggered ONLY by a version tag push (pushing to main does nothing), so work-in-progress
# commits never ship. Each release publishes two image tags: the version and "latest".
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: git.linuxhg.com
username: ${{ gitea.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
# Publishes both the exact version (e.g. v0.2.0) and the movable "latest" tag.
# Deployments default to "latest" via ${IMAGE_TAG:-latest} in docker-compose.yml;
# pin or roll back by setting IMAGE_TAG in .env.
tags: |
git.linuxhg.com/bookhoard/bookhoard:${{ gitea.ref_name }}
git.linuxhg.com/bookhoard/bookhoard:latest