photo26/.forgejo/workflows/docker.yml
krek0 823fe53e22
All checks were successful
Docker / build (release) Successful in 8s
Push latest tag on docker image on release
2026-05-03 23:50:48 +02:00

33 lines
866 B
YAML

name: Docker
on:
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set image tag
id: meta
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Login to Forgejo registry
uses: docker/login-action@v3
with:
registry: git.sinfonie.org
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push image
run: |
docker build \
-t git.sinfonie.org/sinfonie/photo26:${{ steps.meta.outputs.TAG }} \
-t git.sinfonie.org/sinfonie/photo26:latest \
.
docker push git.sinfonie.org/sinfonie/photo26:${{ steps.meta.outputs.TAG }}
docker push git.sinfonie.org/sinfonie/photo26:latest