mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-06 21:46:40 +02:00
f1697f6678
Move Docker image build into the evals workflow as a dependency job. Image tag is keyed on hash of Dockerfile+lockfile+package.json — only rebuilds when those change. Eliminates chicken-and-egg problem where the image must exist before the first PR run. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
name: Build CI Image
|
|
on:
|
|
# Rebuild weekly (Monday 6am UTC) to pick up CLI updates
|
|
schedule:
|
|
- cron: '0 6 * * 1'
|
|
# Rebuild on Dockerfile or lockfile changes
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- '.github/docker/Dockerfile.ci'
|
|
- 'bun.lockb'
|
|
- 'package.json'
|
|
# Build on PRs that change the image (so first PR run has it)
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- '.github/docker/Dockerfile.ci'
|
|
- 'bun.lockb'
|
|
- 'package.json'
|
|
# Manual trigger
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubicloud-standard-2
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
# Copy lockfile + package.json into Docker build context
|
|
- run: cp bun.lockb package.json .github/docker/
|
|
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: docker/build-push-action@v6
|
|
with:
|
|
context: .github/docker
|
|
file: .github/docker/Dockerfile.ci
|
|
push: true
|
|
tags: |
|
|
ghcr.io/${{ github.repository }}/ci:latest
|
|
ghcr.io/${{ github.repository }}/ci:${{ github.sha }}
|