mirror of
https://github.com/luxfi/bridge.git
synced 2026-09-24 00:26:46 +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]>
75 lines
2.4 KiB
YAML
75 lines
2.4 KiB
YAML
name: SPA
|
|
|
|
# Builds the Vite SPA image (root Dockerfile, served by ghcr.io/hanzoai/spa) and
|
|
# publishes it on the plain semver line — the counterpart to bridge.yml, which
|
|
# builds the Go all-in-one on the `-server` line.
|
|
#
|
|
# Lives in .hanzo/workflows because the forge (git.hanzo.ai) dispatches only from
|
|
# here. The SPA build previously sat in .github/workflows/docker.yml, which is no
|
|
# longer read, so the plain-tag image stayed frozen while the `-server` line kept
|
|
# publishing — leaving deployments that pin a plain tag on a months-old bundle
|
|
# whose chain RPCs still used the retired /ext/ prefix.
|
|
#
|
|
# Login uses GHCR_USER / GHCR_TOKEN: the instance GITHUB_TOKEN is minted by
|
|
# git.hanzo.ai and ghcr.io rejects it.
|
|
#
|
|
# BUILD ≠ DEPLOY. This publishes an image and stops; shipping is an `image.tag`
|
|
# edit in universe/deploy/lux-bridge/*.yaml that Hanzo CD reconciles.
|
|
|
|
on:
|
|
push:
|
|
branches: [main, dev, test]
|
|
tags: ['v*']
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: spa-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: [linux-amd64]
|
|
timeout-minutes: 45
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: docker/setup-buildx-action@v3
|
|
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ secrets.GHCR_USER }}
|
|
password: ${{ secrets.GHCR_TOKEN }}
|
|
|
|
- name: Compute tags
|
|
id: meta
|
|
run: |
|
|
set -euo pipefail
|
|
sha="ghcr.io/luxfi/bridge:sha-${GITHUB_SHA:0:7}"
|
|
case "${GITHUB_REF}" in
|
|
refs/tags/v*) tags="ghcr.io/luxfi/bridge:${GITHUB_REF#refs/tags/},ghcr.io/luxfi/bridge:latest,${sha}" ;;
|
|
refs/heads/main) tags="ghcr.io/luxfi/bridge:main,${sha}" ;;
|
|
refs/heads/dev) tags="ghcr.io/luxfi/bridge:dev,${sha}" ;;
|
|
refs/heads/test) tags="ghcr.io/luxfi/bridge:test,${sha}" ;;
|
|
*) tags="" ;;
|
|
esac
|
|
echo "tags=${tags}" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Build & push
|
|
if: steps.meta.outputs.tags != ''
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: Dockerfile
|
|
platforms: linux/amd64
|
|
push: true
|
|
provenance: false
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: |
|
|
org.opencontainers.image.revision=${{ github.sha }}
|
|
org.opencontainers.image.source=https://github.com/luxfi/bridge
|