76 lines
3.1 KiB
Markdown
76 lines
3.1 KiB
Markdown
# godot-ci
|
|
|
|
Custom image extending `barichello/godot-ci` with the Godot export-template toolchain and Blender
|
|
pre-installed, so `Project4x`'s `export-template.yml` doesn't `apt-get install` them on every
|
|
release run.
|
|
|
|
Built from the handoff spec at `Project4x`'s `docs/handoff/godot-ci-custom-image.md`; scope and
|
|
versioning have since moved on from that spec — see below.
|
|
|
|
## Image
|
|
|
|
`git.arthurerlich.de/haylan/godot-ci:<godot-version>`, e.g. `git.arthurerlich.de/haylan/godot-ci:4.7.1`,
|
|
plus a floating `git.arthurerlich.de/haylan/godot-ci:latest` that always points at the newest.
|
|
|
|
Godot **4.0+** only (Blender's `.blend` import is a Godot 4 feature — 3.x builds have no use for
|
|
this image's Blender toolchain).
|
|
|
|
### How versions get built
|
|
|
|
`.gitea/workflows/publish.yml`:
|
|
|
|
- **Nightly (midnight, `schedule:`)**: resolves the newest *stable* Godot release
|
|
(`scripts/resolve-godot-version.sh`) and the newest stable Blender
|
|
(`scripts/resolve-blender-url.sh`), and rebuilds+pushes `<version>` + `latest` only if that
|
|
Godot version isn't already published. If `barichello/godot-ci` hasn't tagged the new Godot
|
|
version yet, the run skips (with a notice, not a failure) and retries the next night.
|
|
- **Manual (`workflow_dispatch`)**: type a Godot version (e.g. `4.6.3`) to (re)build and push that
|
|
exact tag, always with whatever Blender is newest at build time. Overwrites the tag if it
|
|
already exists. Does **not** touch `latest`. Fails clearly if `barichello/godot-ci` has no
|
|
matching tag — check
|
|
[its tag list](https://hub.docker.com/r/barichello/godot-ci/tags) first.
|
|
|
|
Blender has no official "latest stable" API — `resolve-blender-url.sh` scrapes
|
|
`download.blender.org/release/`. `scripts/test-lib.sh` is an offline smoke test for the parsing
|
|
logic both resolve scripts share (`scripts/lib.sh`).
|
|
|
|
## Auth
|
|
|
|
The publish workflow pushes to this repo's Gitea package (container) registry using a **Personal
|
|
Access Token** stored as the repo secret `REGISTRY_PUSH_PAT` — the built-in per-run `GITEA_TOKEN`
|
|
cannot push to the package registry on this instance.
|
|
|
|
- **Scope:** `write:package` (`read:package` too if the workflow ever needs to pull the image
|
|
back before tagging).
|
|
- **Owner:** TODO — fill in once the token is generated (Settings → Applications → Generate New
|
|
Token on the account that should own the published packages).
|
|
|
|
## Building locally for testing
|
|
|
|
The `Dockerfile`'s `GODOT_VERSION` and `BLENDER_URL` build args both have defaults, so a plain
|
|
build with no args works for local testing:
|
|
|
|
```sh
|
|
docker build -t godot-ci-local .
|
|
```
|
|
|
|
Override either to test a specific combination, matching what `publish.yml` would resolve for a
|
|
given night:
|
|
|
|
```sh
|
|
docker build \
|
|
--build-arg GODOT_VERSION=4.6.3 \
|
|
--build-arg BLENDER_URL=https://download.blender.org/release/Blender4.2/blender-4.2.3-linux-x64.tar.xz \
|
|
-t godot-ci-local .
|
|
```
|
|
|
|
## Consuming this image
|
|
|
|
In `Project4x`'s `.gitea/workflows/export-template.yml`, pin to a specific version (recommended,
|
|
matches whatever `GODOT_VERSION` the project itself targets) or float on `latest`:
|
|
|
|
```diff
|
|
- container: barichello/godot-ci:4.7.1
|
|
+ container: git.arthurerlich.de/haylan/godot-ci:4.7.1
|
|
```
|