mirror of
https://github.com/luxfi/work-board.git
synced 2026-09-24 00:24:57 +00:00
One label per runner, spelled <os>-<arch>. The aliases these jobs named were removed, and a job naming a label no runner carries waits instead of failing. Co-authored-by: Hanzo Dev <[email protected]>
99 lines
3.5 KiB
YAML
99 lines
3.5 KiB
YAML
name: Docker
|
|
|
|
# Build the static board image on luxfi's in-cluster ARC pool and push it to
|
|
# GHCR. This is the same in-org self-hosted pattern proven green by
|
|
# luxfi/node · luxfi/dex · luxfi/genesis.
|
|
#
|
|
# One Dockerfile, one workflow, one registry (ghcr.io/luxfi — the source org, so
|
|
# images are never mixed into another org's namespace). The brand matrix stamps
|
|
# each white-label from the same source via the VITE_BRAND build-arg:
|
|
# zoo -> ghcr.io/luxfi/work-board:sha-<sha> (work.zoo.network)
|
|
# pars -> ghcr.io/luxfi/work-board:pars-<sha> (work.pars.network)
|
|
# lux -> ghcr.io/luxfi/work-board:lux-<sha> (work.lux.network)
|
|
# hanzo -> ghcr.io/luxfi/work-board:hanzo-<sha> (work.hanzo.network)
|
|
# The zoo leg resolves exactly as before (VITE_BRAND defaults to zoo), so its
|
|
# image is unchanged. Each brand is a fully independent white-label build — the
|
|
# VITE_BRAND arg selects the profile in src/brands.ts and VITE_RPC_URL bakes the
|
|
# brand's live CORS-enabled RPC into the bundle; no cross-brand leak is possible.
|
|
#
|
|
# NOTE: the org-canonical reusable `hanzoai/.github/.../docker-build.yml@main`
|
|
# is NOT usable from luxfi: hanzoai/.github is a PRIVATE repo and both orgs are
|
|
# on the free plan (no shared enterprise), so GitHub blocks the cross-org
|
|
# `uses:` at parse time. This workflow builds entirely within the luxfi org, so
|
|
# it actually runs; ARC runner pools are org-scoped so a luxfi repo must use the
|
|
# luxfi (lux-build-*) pool.
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
jobs:
|
|
build:
|
|
# lux-build-amd64: in-cluster ARC scale-set (lux-k8s, amd64 DOKS, DinD).
|
|
# amd64-only — the deploy targets (zoo-k8s, pars-k8s) are amd64; a static SPA
|
|
# needs no arm64.
|
|
runs-on: [linux-amd64]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- brand: zoo
|
|
prefix: sha-
|
|
rpc: https://api.zoo.network/v1/chain/C/rpc
|
|
- brand: pars
|
|
prefix: pars-
|
|
rpc: https://api.pars.network/ext/bc/C/rpc
|
|
- brand: lux
|
|
prefix: lux-
|
|
rpc: https://api.lux.network/v1/chain/C/rpc
|
|
- brand: hanzo
|
|
prefix: hanzo-
|
|
rpc: https://api.hanzo.network/v1/chain/C/rpc
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
with:
|
|
driver: docker-container
|
|
driver-opts: |
|
|
network=host
|
|
|
|
- name: Login to GHCR
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ secrets.GHCR_USER }}
|
|
password: ${{ secrets.GHCR_TOKEN }}
|
|
- name: Image metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ghcr.io/luxfi/work-board
|
|
# Immutable per-commit tag, one per brand; never :latest / :main.
|
|
flavor: |
|
|
latest=false
|
|
tags: |
|
|
type=sha,format=short,prefix=${{ matrix.prefix }}
|
|
|
|
- name: Build & push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: Dockerfile
|
|
platforms: linux/amd64
|
|
push: true
|
|
# Select the white-label profile and bake the live, CORS-enabled brand
|
|
# RPC into the bundle at build time.
|
|
build-args: |
|
|
VITE_BRAND=${{ matrix.brand }}
|
|
VITE_RPC_URL=${{ matrix.rpc }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
provenance: false
|