Skip to content

Commit de1fb87

Browse files
committed
ci(fork): build Plane images from feat/worklogs to the Zot registry
A fork-owned workflow rather than an edit to upstream's build-branch.yml, which targets Docker Hub with makeplane credentials. Same nesting principle as docs/fork/: nothing here collides on a merge from makeplane/plane. Builds all five images even though only web and api carry worklogs code. The Helm chart composes every image as `<image>:{{ .planeVersion }}`, so the tag is global — a mixed fork/upstream deployment is not expressible without patching the chart, and one provenance beats a chart fork. Runs on the ledoent org's in-cluster ARC runners, which are amd64, so the images are built natively rather than cross-compiled from arm64. Pushes as robot-push-ledoent, scoped to ledoent/** with create+update but not delete, rather than the github-ci admin account. Claude-Session: https://claude.ai/code/session_01XvVRm84RrH9APR25g8pFXt
1 parent edf9f51 commit de1fb87

1 file changed

Lines changed: 176 additions & 0 deletions

File tree

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
name: ledoent build (Plane images → Zot)
2+
3+
# Builds linux/amd64 images for the Plane services from the fork's feature
4+
# branch and pushes to registry.hz.ledoweb.com/ledoent/plane-*.
5+
#
6+
# This is a fork-owned file, deliberately NOT an edit to upstream's
7+
# build-branch.yml (which targets Docker Hub with makeplane credentials).
8+
# Same nesting principle as docs/fork/ — nothing here collides on a merge
9+
# from makeplane/plane.
10+
#
11+
# All five images are built even though only web and api contain worklogs
12+
# code: the Helm chart composes every image as `<image>:{{ .planeVersion }}`,
13+
# so the tag is global and a mixed fork/upstream deployment is not
14+
# expressible without patching the chart.
15+
#
16+
# Requires the ZOT_PUSH_PASSWORD repo secret (robot-push-ledoent, scoped to
17+
# ledoent/** with create+update but not delete).
18+
19+
on:
20+
push:
21+
branches: [feat/worklogs]
22+
workflow_dispatch:
23+
inputs:
24+
version:
25+
description: "Image tag (e.g. v1.4.0-worklogs-abc1234). Defaults to planeVersion + git SHA."
26+
required: false
27+
28+
concurrency:
29+
group: ledoent-build-${{ github.ref }}
30+
cancel-in-progress: true
31+
32+
env:
33+
ZOT_REGISTRY: registry.hz.ledoweb.com
34+
ZOT_IMAGE_PREFIX: registry.hz.ledoweb.com/ledoent
35+
36+
jobs:
37+
# Gate the push on the cheap checks. The Playwright suites need a running
38+
# Postgres/Redis/RabbitMQ stack and stay local; these three catch the
39+
# failures most likely to reach an image.
40+
check:
41+
name: Typecheck, lint, unit tests
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v4
45+
46+
- uses: pnpm/action-setup@v4
47+
48+
- uses: actions/setup-node@v4
49+
with:
50+
node-version: 22.18.0
51+
cache: pnpm
52+
53+
- name: Install
54+
run: pnpm install --frozen-lockfile
55+
56+
- name: Typecheck and lint
57+
run: pnpm exec turbo run check:types check:lint
58+
59+
- name: Unit tests
60+
run: pnpm --filter @plane/utils test
61+
62+
build:
63+
name: Build and push images
64+
needs: check
65+
runs-on: ubuntu-latest
66+
permissions:
67+
contents: read
68+
steps:
69+
- uses: actions/checkout@v4
70+
71+
- name: Compute version tag
72+
id: version
73+
run: |
74+
if [ -n "${{ inputs.version }}" ]; then
75+
TAG="${{ inputs.version }}"
76+
else
77+
# planeVersion in the chart values is the upstream base this fork
78+
# sits on; encoding it keeps the tag honest about provenance.
79+
BASE=v1.4.0
80+
SHA=$(git rev-parse --short HEAD)
81+
TAG="${BASE}-worklogs-${SHA}"
82+
fi
83+
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
84+
echo "Building $TAG"
85+
86+
- name: Set up Docker Buildx
87+
uses: docker/setup-buildx-action@v3
88+
89+
- name: Login to Zot registry
90+
uses: docker/login-action@v3
91+
with:
92+
registry: ${{ env.ZOT_REGISTRY }}
93+
username: robot-push-ledoent
94+
password: ${{ secrets.ZOT_PUSH_PASSWORD }}
95+
96+
# The VITE_* build args are left at their Dockerfile defaults on purpose:
97+
# empty base URLs (same origin) with /god-mode, /spaces and /live base
98+
# paths already match the single-host ingress this deploys behind.
99+
100+
- name: Build and push plane-frontend
101+
uses: docker/build-push-action@v6
102+
with:
103+
context: .
104+
file: apps/web/Dockerfile.web
105+
platforms: linux/amd64
106+
push: true
107+
tags: ${{ env.ZOT_IMAGE_PREFIX }}/plane-frontend:${{ steps.version.outputs.tag }}
108+
cache-from: type=gha,scope=frontend
109+
cache-to: type=gha,scope=frontend,mode=max
110+
111+
- name: Build and push plane-space
112+
uses: docker/build-push-action@v6
113+
with:
114+
context: .
115+
file: apps/space/Dockerfile.space
116+
platforms: linux/amd64
117+
push: true
118+
tags: ${{ env.ZOT_IMAGE_PREFIX }}/plane-space:${{ steps.version.outputs.tag }}
119+
cache-from: type=gha,scope=space
120+
cache-to: type=gha,scope=space,mode=max
121+
122+
- name: Build and push plane-admin
123+
uses: docker/build-push-action@v6
124+
with:
125+
context: .
126+
file: apps/admin/Dockerfile.admin
127+
platforms: linux/amd64
128+
push: true
129+
tags: ${{ env.ZOT_IMAGE_PREFIX }}/plane-admin:${{ steps.version.outputs.tag }}
130+
cache-from: type=gha,scope=admin
131+
cache-to: type=gha,scope=admin,mode=max
132+
133+
- name: Build and push plane-live
134+
uses: docker/build-push-action@v6
135+
with:
136+
context: .
137+
file: apps/live/Dockerfile.live
138+
platforms: linux/amd64
139+
push: true
140+
tags: ${{ env.ZOT_IMAGE_PREFIX }}/plane-live:${{ steps.version.outputs.tag }}
141+
cache-from: type=gha,scope=live
142+
cache-to: type=gha,scope=live,mode=max
143+
144+
# Note the narrower context: Dockerfile.api COPYs requirements.txt from
145+
# the build root, so it builds from apps/api rather than the repo root.
146+
- name: Build and push plane-backend
147+
uses: docker/build-push-action@v6
148+
with:
149+
context: apps/api
150+
file: apps/api/Dockerfile.api
151+
platforms: linux/amd64
152+
push: true
153+
tags: ${{ env.ZOT_IMAGE_PREFIX }}/plane-backend:${{ steps.version.outputs.tag }}
154+
cache-from: type=gha,scope=backend
155+
cache-to: type=gha,scope=backend,mode=max
156+
157+
- name: Summary
158+
run: |
159+
TAG="${{ steps.version.outputs.tag }}"
160+
{
161+
echo "### Images pushed to Zot"
162+
echo ''
163+
echo "**Tag:** \`$TAG\`"
164+
echo ''
165+
echo '| Service | Image |'
166+
echo '|---|---|'
167+
for SVC in plane-frontend plane-space plane-admin plane-live plane-backend; do
168+
echo "| $SVC | \`${{ env.ZOT_IMAGE_PREFIX }}/$SVC:$TAG\` |"
169+
done
170+
echo ''
171+
echo 'Deploy with:'
172+
echo '```sh'
173+
echo "helm upgrade plane /tmp/plane-helm/charts/plane-ce -n plane \\"
174+
echo " -f values.yaml -f values.secret.yaml --set planeVersion=$TAG"
175+
echo '```'
176+
} >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)