32 lines
1.0 KiB
YAML
32 lines
1.0 KiB
YAML
name: CI image
|
|
|
|
# Builds the Arch image that ci.yml runs in, with the build dependencies preinstalled.
|
|
# Rebuilt weekly to pick up Arch updates.
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths: ['.gitea/ci-image/**', '.gitea/workflows/ci-image.yml']
|
|
schedule:
|
|
- cron: '0 3 * * 1'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
image:
|
|
# The build runs on the runner's own Docker daemon, so the amd64 runner has the new
|
|
# image locally right away. It does not re-pull tags it already has.
|
|
runs-on: amd64
|
|
env:
|
|
IMAGE: git.trivk.dev/tri/qtpotato-ci:latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build
|
|
run: docker build --pull -t "$IMAGE" .gitea/ci-image
|
|
- name: Push
|
|
# Gitea's Actions token cannot push to the container registry, so this uses an
|
|
# access token with the write:package scope.
|
|
env:
|
|
TOKEN: ${{ secrets.PACKAGE_TOKEN }}
|
|
run: |
|
|
echo "$TOKEN" | docker login git.trivk.dev -u "${{ github.repository_owner }}" --password-stdin
|
|
docker push "$IMAGE"
|