Compare commits

...
Author SHA1 Message Date
branderson 651fe4e95e ci: install the Docker CLI and allow a registry host override
The privileged runner's job image has no Docker client, which the login
and build actions need. The registry host can be set with a REGISTRY_HOST
repository variable when the runner reaches Gitea at an internal address.
2026-10-13 23:23:06 -07:00
branderson 0d08cde3c1 Merge pull request 'CI: log in to the registry as the repository owner' (#4) from ci-registry-login into main
Images / app (push) Failing after 1m10s
Images / streamer (push) Failing after 1m14s
Images / session-manager (push) Failing after 1m13s
Reviewed-on: #4
Reviewed-by: branderson <brad@branderson.io>
2026-10-13 23:19:12 -07:00
branderson e1cf8aff29 ci: log in to the registry as the repository owner
Only REGISTRY_TOKEN is configured; the REGISTRY_USERNAME secret the
login step read doesn't exist, so it logged in with an empty username.
2026-10-13 23:17:36 -07:00
branderson 9b46a25802 Merge pull request 'CI: dejima runner labels and short job names' (#3) from ci-runner-labels into main
Images / app (push) Failing after 6m49s
Images / streamer (push) Failing after 1m7s
Images / session-manager (push) Failing after 1m9s
Reviewed-on: #3
Reviewed-by: branderson <brad@branderson.io>
2026-10-13 22:23:15 -07:00
branderson 71682ae2b7 ci: run image builds on dejima-privileged, with short job names 2026-10-13 22:22:39 -07:00
branderson bac27cbc05 Merge pull request 'Dotcom Arcade: rename, one compose file, Ultimate setup script and docs' (#1) from rebrand-and-docs into main
Images / build (., dotcom-arcade) (push) Canceled after 0s
Images / build (streaming/session-manager, dotcom-arcade-session-manager) (push) Canceled after 0s
Images / build (streaming/streamer, dotcom-arcade-streamer) (push) Canceled after 0s
Reviewed-on: #1
Reviewed-by: branderson <brad@branderson.io>
2026-10-13 22:17:00 -07:00
branderson c49fd1e4e9 Merge pull request 'Release prep: legal-safe setup, hosting requirements, in-app stream proxy, Gitea CI, cleanup' (#2) from release-prep into rebrand-and-docs
Reviewed-on: #2
Reviewed-by: branderson <brad@branderson.io>
2026-10-13 22:14:30 -07:00
2 changed files with 40 additions and 13 deletions
+33 -9
View File
@@ -1,8 +1,10 @@
# Builds the app, session manager and streamer images and pushes them to this
# Gitea instance's container registry, under the repository's owner.
#
# Needs repository secrets REGISTRY_USERNAME and REGISTRY_TOKEN: a user, and an
# access token of theirs with package write access.
# Needs a repository secret REGISTRY_TOKEN: an access token with package write
# access, belonging to the repository's owner. If the runner reaches Gitea at a
# different address than the registry's public one, set a repository variable
# REGISTRY_HOST to the registry's host name.
name: Images
on:
@@ -11,28 +13,50 @@ on:
tags: ['v*.*.*']
workflow_dispatch:
# Jobs that run docker builds use dejima-privileged; anything else should use
# dejima-confined.
jobs:
build:
runs-on: ubuntu-latest
name: ${{ matrix.name }}
runs-on: dejima-privileged
strategy:
fail-fast: false
matrix:
include:
- image: dotcom-arcade
- name: app
image: dotcom-arcade
context: .
- image: dotcom-arcade-session-manager
- name: session-manager
image: dotcom-arcade-session-manager
context: streaming/session-manager
- image: dotcom-arcade-streamer
- name: streamer
image: dotcom-arcade-streamer
context: streaming/streamer
steps:
- uses: actions/checkout@v4
# The registry lives on the same host as this Gitea instance
# The runner mounts the host's Docker socket, but its job image ships no
# Docker client, and the login and build actions shell out to `docker`.
# Only Docker's repository is refreshed, so the job needs no other mirrors.
- name: Install the Docker CLI
run: |
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" > /etc/apt/sources.list.d/docker.list
apt-get update -o Dir::Etc::sourcelist=sources.list.d/docker.list -o Dir::Etc::sourceparts=- -o APT::Get::List-Cleanup=0
apt-get install -y --no-install-recommends docker-ce-cli
# The registry is this Gitea instance, unless REGISTRY_HOST says otherwise
- name: Locate the registry
id: registry
shell: bash
env:
REGISTRY_HOST: ${{ vars.REGISTRY_HOST }}
run: |
host=${GITHUB_SERVER_URL#*://}
echo "host=${host%/}" >> "$GITHUB_OUTPUT"
host=${REGISTRY_HOST:-${host%/}}
echo "host=$host" >> "$GITHUB_OUTPUT"
echo "owner=${GITHUB_REPOSITORY_OWNER,,}" >> "$GITHUB_OUTPUT"
- uses: docker/setup-buildx-action@v3
@@ -40,7 +64,7 @@ jobs:
- uses: docker/login-action@v3
with:
registry: ${{ steps.registry.outputs.host }}
username: ${{ secrets.REGISTRY_USERNAME }}
username: ${{ github.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }}
- id: meta
+7 -4
View File
@@ -43,10 +43,13 @@ Then run `docker compose pull && docker compose up -d`.
`.gitea/workflows/images.yml` builds all three images on Gitea Actions and
pushes them to the Gitea instance's container registry, under the repository's
owner. Pushes to `main` publish a `main` tag; `v1.2.3` tags publish `1.2.3`,
`1.2` and `latest`. It needs two repository secrets:
- `REGISTRY_USERNAME`: a user;
- `REGISTRY_TOKEN`: an access token of theirs with package write access.
`1.2` and `latest`. Its jobs run docker builds, so they need a runner labelled
`dejima-privileged`; jobs that don't build images should use `dejima-confined`.
It also needs a repository secret, `REGISTRY_TOKEN`: an access token with
package write access, belonging to the repository's owner, whom the workflow
logs in as. If the runner reaches Gitea at a different address than the
registry's public one, set a repository variable `REGISTRY_HOST` to the
registry's host name.
## Volumes