feat: significantly better ci images (#1516)

This commit is contained in:
zk
2026-05-20 01:20:32 +01:00
committed by GitHub
parent 312119e686
commit 6d77ed3c48
12 changed files with 119 additions and 47 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ jobs:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/zkldi/tachi-dev:main
image: ghcr.io/zkldi/tachi-ci:main
options: --user root
env:
NODE_ENV: "test"
+2 -2
View File
@@ -25,7 +25,7 @@ jobs:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/zkldi/tachi-dev:main
image: ghcr.io/zkldi/tachi-ci:main
options: --user root
steps:
- name: Checkout
@@ -45,7 +45,7 @@ jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/zkldi/tachi-dev:main
image: ghcr.io/zkldi/tachi-ci:main
options: --user root
needs: test
if: ${{ github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }}
+1 -1
View File
@@ -22,7 +22,7 @@ jobs:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/zkldi/tachi-dev:main
image: ghcr.io/zkldi/tachi-ci:main
options: --user root
steps:
- name: Checkout
+1 -1
View File
@@ -26,7 +26,7 @@ jobs:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/zkldi/tachi-dev:main
image: ghcr.io/zkldi/tachi-ci:main
options: --user root
steps:
- name: Checkout
+26 -3
View File
@@ -53,16 +53,39 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Build and push
# `tachi-ci` = the minimal `base` stage. Used as the `container:` image
# for every workspace CI job. Kept small so the per-job image pull is
# cheap.
- name: Build and push tachi-ci (base stage)
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
context: .
file: Dockerfile.dev
target: base
push: ${{ github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }}
tags: |
ghcr.io/zkldi/tachi-ci:main
ghcr.io/zkldi/tachi-ci:latest
ghcr.io/zkldi/tachi-ci:${{ steps.revision.outputs.image_tag }}
ghcr.io/zkldi/tachi-ci:${{ github.sha }}
cache-from: type=gha,scope=dev-image-base
cache-to: type=gha,mode=max,scope=dev-image-base
# `tachi-dev` = full devcontainer image (`dev` stage on top of `base`).
# Pulled by devs once and rebuilt rarely; CI never touches it.
- name: Build and push tachi-dev (dev stage)
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
context: .
file: Dockerfile.dev
target: dev
push: ${{ github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }}
tags: |
ghcr.io/zkldi/tachi-dev:main
ghcr.io/zkldi/tachi-dev:latest
ghcr.io/zkldi/tachi-dev:${{ steps.revision.outputs.image_tag }}
ghcr.io/zkldi/tachi-dev:${{ github.sha }}
cache-from: type=gha,scope=dev-image
cache-to: type=gha,mode=max,scope=dev-image
cache-from: |
type=gha,scope=dev-image-dev
type=gha,scope=dev-image-base
cache-to: type=gha,mode=max,scope=dev-image-dev
+1 -1
View File
@@ -28,7 +28,7 @@ jobs:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/zkldi/tachi-dev:main
image: ghcr.io/zkldi/tachi-ci:main
options: --user root
steps:
- name: Checkout
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
container:
image: ghcr.io/zkldi/tachi-dev:main
image: ghcr.io/zkldi/tachi-ci:main
options: --user root
if: ${{ github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }}
steps:
+1 -1
View File
@@ -26,7 +26,7 @@ jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/zkldi/tachi-dev:main
image: ghcr.io/zkldi/tachi-ci:main
options: --user root
steps:
- name: Checkout
+1 -1
View File
@@ -36,7 +36,7 @@ jobs:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/zkldi/tachi-dev:main
image: ghcr.io/zkldi/tachi-ci:main
options: --user root
env:
NODE_ENV: "test"