7 Commits
5 changed files with 59 additions and 23 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
APP_ENV=dev
APP_DEBUG=0
APP_DEBUG=1
APP_SECRET=changeme_replace_with_random_32char_string
# Comma-separated list of allowed hostnames. Leave empty to allow all hosts.
+33 -15
View File
@@ -1,10 +1,10 @@
# Builds and pushes a multi-arch Docker image to the Gitea container registry
# whenever a semver tag (v*.*.*) is pushed.
# Builds and pushes a multi-arch Docker image to the Gitea container registry.
# Triggered manually via workflow_dispatch — enter an existing semver tag (e.g. 1.2.3)
# in the "Release tag" input. The workflow will fail early if the tag does not exist.
#
# One-time setup required:
# 1. Create a Gitea token with "package:write" scope.
# 2. Add it as a repository secret named GITEA_TOKEN
# (Repository → Settings → Secrets → Actions).
# Requires a repository secret REGISTRY_TOKEN — a Gitea PAT with write:package scope.
# Create it at: Settings → Applications → Generate Token (scope: write:package)
# Then add it: Repository → Settings → Secrets → Actions → REGISTRY_TOKEN
#
# After a successful run the image is available at:
# <your-gitea-host>/<owner>/<repo>:<version>
@@ -12,17 +12,33 @@
name: Docker Publish
on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
inputs:
tag:
description: 'Release tag (semver, e.g. 1.2.3)'
required: true
type: string
jobs:
build-push:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Validate tag exists
run: |
if ! git rev-parse "refs/tags/${{ inputs.tag }}" >/dev/null 2>&1; then
echo "Error: tag '${{ inputs.tag }}' does not exist in this repository."
exit 1
fi
git checkout "refs/tags/${{ inputs.tag }}"
# Strip the protocol from the server URL to get the registry hostname.
# e.g. https://gitea.example.com → gitea.example.com
@@ -30,17 +46,19 @@ jobs:
run: |
echo "REGISTRY=$(echo '${{ gitea.server_url }}' | sed 's|https://||;s|http://||')" >> $GITHUB_ENV
# Generates OCI-compliant tags and labels from the git tag.
# v1.2.3 → image tags: 1.2.3 / 1.2 / 1
# Generates OCI-compliant tags and labels from the provided release tag.
# 1.2.3 → image tags: 1.2.3 / 1.2 / 1
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ gitea.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=semver,pattern={{version}},value=${{ inputs.tag }}
type=semver,pattern={{major}}.{{minor}},value=${{ inputs.tag }}
type=semver,pattern={{major}},value=${{ inputs.tag }}
labels: |
org.opencontainers.image.source=${{ gitea.server_url }}/${{ gitea.repository }}
# QEMU enables emulation of arm64 on the amd64 runner.
- name: Set up QEMU
@@ -55,7 +73,7 @@ jobs:
with:
registry: ${{ env.REGISTRY }}
username: ${{ gitea.actor }}
password: ${{ secrets.GITEA_TOKEN }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
+18
View File
@@ -117,6 +117,24 @@ Add to `.claude/settings.json` to run PHPUnit automatically after every file edi
}
```
## Gitea Workflows
Workflow files live in [.gitea/workflows/](.gitea/workflows/). This project uses Gitea Actions (GitHub Actions-compatible syntax).
**When editing workflow files:**
- Use `gitea.*` context variables, not `github.*` — e.g. `${{ gitea.server_url }}`, `${{ gitea.actor }}`, `${{ gitea.repository }}`
- `GITHUB_ENV` and `GITHUB_OUTPUT` are still the correct env file names (Gitea Actions re-uses these)
- Secrets are set under Repository → Settings → Secrets → Actions
- The registry hostname must be derived from `gitea.server_url` (strip the protocol prefix)
- Triggers use standard `on:` syntax; `tags: '*.*.*'` matches semver pushes without a `v` prefix
**Current workflows:**
| File | Trigger | Purpose |
|---|---|---|
| `docker-publish.yml` | Push tag `*.*.*` | Build & push multi-arch image to Gitea container registry |
## Docker
### Development
+1 -1
View File
@@ -1,4 +1,4 @@
FROM php:8.3-cli-alpine AS base
FROM php:8.4-cli-alpine3.21 AS base
RUN apk add --no-cache \
curl \
+1 -1
View File
@@ -6,7 +6,7 @@ A self-hosted Symfony service that merges contribution data from **GitHub**, **G
https://your-host/graph.svg?theme=dark
```
![Example graph](https://gitgraph.arthurerlich/graph.svg)
![Example graph](https://gitgraph.arthurerlich.de/graph.svg)
---