docker workflow
Build & Push Docker Image / Build and push (push) Failing after 17m10s

This commit is contained in:
Oliver Walter
2026-06-06 16:14:02 +02:00
parent 5f43c19878
commit 4d1133a33e
8 changed files with 326 additions and 0 deletions
+63
View File
@@ -0,0 +1,63 @@
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