Files
toollist/.gitea/workflows/docker.yml
T
Oliver Walter 4d1133a33e
Build & Push Docker Image / Build and push (push) Failing after 17m10s
docker workflow
2026-06-06 16:14:02 +02:00

64 lines
2.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Build & Push Docker Image
env:
REGISTRY: git.revwal.de
on:
push:
branches:
- main
- master
tags:
- "v*"
workflow_dispatch: # allow manual runs from the Gitea UI
jobs:
build-and-push:
name: Build and push
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# ── Docker setup ────────────────────────────────────────────────────────
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# ── Authenticate to the Gitea container registry ────────────────────────
- name: Log in to Gitea container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ gitea.actor }}
password: ${{ secrets.GITEATOKEN }}
# ── Tag strategy ────────────────────────────────────────────────────────
# Produces:
# • latest on every push to the default branch
# • <branch-name> on every push to a non-default branch
# • v1.2.3 / 1.2 on version tags (v*)
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ gitea.repository }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
# ── Build and push ───────────────────────────────────────────────────────
# Layer cache is stored in the Gitea/act_runner GHA cache so the slow
# cargo-leptos compilation is reused across runs when nothing changes.
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max