Compare commits
7
Commits
0.0.1
..
7c1b893e09
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c1b893e09 | ||
|
|
4993fdca00 | ||
|
|
c4803ea5cb | ||
|
|
19bfa4cf28 | ||
|
|
e70d035672 | ||
|
|
d57320cb77 | ||
|
|
5feae97dd3 |
@@ -1,5 +1,5 @@
|
|||||||
APP_ENV=dev
|
APP_ENV=dev
|
||||||
APP_DEBUG=0
|
APP_DEBUG=1
|
||||||
APP_SECRET=changeme_replace_with_random_32char_string
|
APP_SECRET=changeme_replace_with_random_32char_string
|
||||||
|
|
||||||
# Comma-separated list of allowed hostnames. Leave empty to allow all hosts.
|
# Comma-separated list of allowed hostnames. Leave empty to allow all hosts.
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# Builds and pushes a multi-arch Docker image to the Gitea container registry
|
# Builds and pushes a multi-arch Docker image to the Gitea container registry.
|
||||||
# whenever a semver tag (v*.*.*) is pushed.
|
# 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:
|
# Requires a repository secret REGISTRY_TOKEN — a Gitea PAT with write:package scope.
|
||||||
# 1. Create a Gitea token with "package:write" scope.
|
# Create it at: Settings → Applications → Generate Token (scope: write:package)
|
||||||
# 2. Add it as a repository secret named GITEA_TOKEN
|
# Then add it: Repository → Settings → Secrets → Actions → REGISTRY_TOKEN
|
||||||
# (Repository → Settings → Secrets → Actions).
|
|
||||||
#
|
#
|
||||||
# After a successful run the image is available at:
|
# After a successful run the image is available at:
|
||||||
# <your-gitea-host>/<owner>/<repo>:<version>
|
# <your-gitea-host>/<owner>/<repo>:<version>
|
||||||
@@ -12,17 +12,33 @@
|
|||||||
name: Docker Publish
|
name: Docker Publish
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_dispatch:
|
||||||
tags:
|
inputs:
|
||||||
- 'v*.*.*'
|
tag:
|
||||||
|
description: 'Release tag (semver, e.g. 1.2.3)'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-push:
|
build-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
contents: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
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.
|
# Strip the protocol from the server URL to get the registry hostname.
|
||||||
# e.g. https://gitea.example.com → gitea.example.com
|
# e.g. https://gitea.example.com → gitea.example.com
|
||||||
@@ -30,17 +46,19 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "REGISTRY=$(echo '${{ gitea.server_url }}' | sed 's|https://||;s|http://||')" >> $GITHUB_ENV
|
echo "REGISTRY=$(echo '${{ gitea.server_url }}' | sed 's|https://||;s|http://||')" >> $GITHUB_ENV
|
||||||
|
|
||||||
# Generates OCI-compliant tags and labels from the git tag.
|
# Generates OCI-compliant tags and labels from the provided release tag.
|
||||||
# v1.2.3 → image tags: 1.2.3 / 1.2 / 1
|
# 1.2.3 → image tags: 1.2.3 / 1.2 / 1
|
||||||
- name: Extract Docker metadata
|
- name: Extract Docker metadata
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ gitea.repository }}
|
images: ${{ env.REGISTRY }}/${{ gitea.repository }}
|
||||||
tags: |
|
tags: |
|
||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{version}},value=${{ inputs.tag }}
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
type=semver,pattern={{major}}.{{minor}},value=${{ inputs.tag }}
|
||||||
type=semver,pattern={{major}}
|
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.
|
# QEMU enables emulation of arm64 on the amd64 runner.
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
@@ -55,7 +73,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ gitea.actor }}
|
username: ${{ gitea.actor }}
|
||||||
password: ${{ secrets.GITEA_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
|
|||||||
@@ -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
|
## Docker
|
||||||
|
|
||||||
### Development
|
### Development
|
||||||
|
|||||||
+1
-1
@@ -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 \
|
RUN apk add --no-cache \
|
||||||
curl \
|
curl \
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ A self-hosted Symfony service that merges contribution data from **GitHub**, **G
|
|||||||
https://your-host/graph.svg?theme=dark
|
https://your-host/graph.svg?theme=dark
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user