112 lines
2.2 KiB
Markdown
112 lines
2.2 KiB
Markdown
# Gitea Actions CI image
|
|
|
|
This image extends Gitea/act's Ubuntu runner image:
|
|
|
|
```text
|
|
catthehacker/ubuntu:act-latest
|
|
```
|
|
|
|
It includes:
|
|
|
|
- Clang/LLVM 22
|
|
- Meson
|
|
- Ninja
|
|
- Python 3 + pip + venv
|
|
- Vulkan development packages/tools
|
|
- Mesa Vulkan software/runtime drivers
|
|
- Git/build-essential/pkg-config
|
|
- Node/runtime pieces inherited from the act Ubuntu image, so JavaScript actions like `actions/checkout` keep working
|
|
|
|
## Files prepared
|
|
|
|
```text
|
|
ci/Dockerfile
|
|
.dockerignore
|
|
.gitea/workflows/build-ci-image.yml
|
|
.gitea/workflows/build.yml
|
|
```
|
|
|
|
## Required Gitea variables/secrets
|
|
|
|
In your repository or organization settings, add these **Actions variables**:
|
|
|
|
```text
|
|
REGISTRY_HOST=git.neosisyphus.com
|
|
REGISTRY_IMAGE=git.neosisyphus.com/evol3d/evol-testbed
|
|
CI_IMAGE=git.neosisyphus.com/evol3d/evol-testbed
|
|
```
|
|
|
|
Add this **Actions secret**:
|
|
|
|
```text
|
|
REGISTRY_PASSWORD=your-gitea-token-or-password
|
|
```
|
|
|
|
The token/password needs permission to publish packages/container images.
|
|
|
|
Optional: add this secret if your registry username is different from the Gitea Actions actor:
|
|
|
|
```text
|
|
REGISTRY_USERNAME=your-gitea-username
|
|
```
|
|
|
|
If `REGISTRY_USERNAME` is not set, the workflow uses `$GITHUB_ACTOR`.
|
|
|
|
## Build manually
|
|
|
|
```bash
|
|
docker build -t evol-testbed:latest -f ci/Dockerfile .
|
|
```
|
|
|
|
Test:
|
|
|
|
```bash
|
|
docker run --rm -it evol-testbed:latest bash -lc '
|
|
clang --version &&
|
|
meson --version &&
|
|
ninja --version &&
|
|
python3 --version &&
|
|
vulkaninfo --summary || true
|
|
'
|
|
```
|
|
|
|
Tag and push:
|
|
|
|
```bash
|
|
docker login git.neosisyphus.com
|
|
|
|
docker tag evol-testbed:latest git.neosisyphus.com/evol3d/evol-testbed:latest
|
|
|
|
docker push git.neosisyphus.com/evol3d/evol-testbed:latest
|
|
```
|
|
|
|
## Build automatically in Gitea Actions
|
|
|
|
After setting the variables/secrets above, run:
|
|
|
|
```text
|
|
.gitea/workflows/build-ci-image.yml
|
|
```
|
|
|
|
It builds and pushes:
|
|
|
|
```text
|
|
${REGISTRY_IMAGE}:latest
|
|
```
|
|
|
|
## Use in normal builds
|
|
|
|
`.gitea/workflows/build.yml` is already prepared to use:
|
|
|
|
```yaml
|
|
container:
|
|
image: ${{ vars.CI_IMAGE }}:latest
|
|
```
|
|
|
|
If expressions do not work in `container.image` on your Gitea version, replace it with the literal image path:
|
|
|
|
```yaml
|
|
container:
|
|
image: git.neosisyphus.com/evol3d/evol-testbed:latest
|
|
```
|