dotfiles/.gitea/workflows/build-docker-container.yml

33 lines
No EOL
1.3 KiB
YAML

# Gitea/Forgejo does not support this, we have to pass a custom token
# permissions:
# contents: read
# packages: write
name: build-docker-container
on: [push]
jobs:
build:
runs-on: any
container:
image: node:24-alpine
strategy:
fail-fast: false # If one fails, dont fail all of them
matrix:
include:
- { name: bare, env: bare, arch: x86_64-linux }
# - { name: bare, env: bare, arch: aarch64-linux }
# - { env: home, arch: x86_64-linux }
- { name: claude, env: claude, arch: x86_64-linux, user: claude, email: claude@example.com }
steps:
- run: apk add --no-cache git docker-cli docker-cli-buildx
- run: |
git clone --depth 1 -b "$GITHUB_REF_NAME" "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" .
cd actions
npm install -g zx@8.8.5-lite
# Node does not resolve global modules properly, so I guess we symlink
# the global store into the local folder so that local module resolution
# traversal will find it
ln -s /usr/local/lib/node_modules ./node_modules
./build-docker-container.ts all "${{ matrix.name }}" "${{ matrix.env }}" "${{ matrix.arch }}" "${{ matrix.user }}" "${{ matrix.email }}" "${{ matrix.git_branch }}"
env:
REGISTRY_TOKEN: ${{ secrets.MY_DOCKER_WRITE_TOKEN }}