mirror of
https://github.com/hanzoai/kms.git
synced 2026-10-17 11:18:16 +00:00
Build, test and publish on the forge from hanzo.yml
.hanzo/workflows/cicd.yml runs hanzoai/ci build.yml, which gates on the Go tests and the console tests, builds the kms and kms-fetch images, and publishes frontend/dist to the Sites plane as kms. The GitHub workflows that did the same work are removed. Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
name: Build kms-fetch
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'cmd/kms-fetch/**'
|
||||
- 'pkg/kmsclient/**'
|
||||
- 'pkg/iamclient/**'
|
||||
- 'Dockerfile.kms-fetch'
|
||||
- 'go.mod'
|
||||
- 'go.sum'
|
||||
- '.github/workflows/build-kms-fetch.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: hanzoai/.github/.github/workflows/docker-build.yml@main
|
||||
with:
|
||||
dockerfile: Dockerfile.kms-fetch
|
||||
image: ghcr.io/hanzoai/kms-fetch
|
||||
# arm64 paused — DOKS no arm64 droplets; mirror sibling repos.
|
||||
platforms: linux/amd64
|
||||
secrets: inherit
|
||||
@@ -1,33 +0,0 @@
|
||||
name: Build kms
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ['v*']
|
||||
paths:
|
||||
- 'cmd/**'
|
||||
- 'pkg/**'
|
||||
- 'frontend/**'
|
||||
- 'go.mod'
|
||||
- 'go.sum'
|
||||
- 'Dockerfile'
|
||||
- '.github/workflows/build.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: hanzoai/.github/.github/workflows/docker-build.yml@main
|
||||
with:
|
||||
dockerfile: Dockerfile
|
||||
image: ghcr.io/hanzoai/kms
|
||||
# arm64 paused — DOKS has no arm64 droplets (catalog is amd64
|
||||
# Intel/AMD only). Re-enable `linux/amd64,linux/arm64` when DO
|
||||
# ships arm64 instances and the `linux-arm64` ARC
|
||||
# scale set is reinstalled on hanzo-k8s.
|
||||
platforms: linux/amd64
|
||||
secrets: inherit
|
||||
@@ -1,30 +0,0 @@
|
||||
name: CI Pipeline
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["*"]
|
||||
pull_request:
|
||||
branches: ["*"]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: [linux-amd64]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: "1.26"
|
||||
|
||||
- name: Download dependencies
|
||||
run: go mod download
|
||||
|
||||
- name: Run unit tests
|
||||
run: go test -v -race ./...
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
CGO_ENABLED=0 go build -v ./cmd/kmsd
|
||||
CGO_ENABLED=0 go build -v ./cmd/kms
|
||||
@@ -0,0 +1,14 @@
|
||||
# The whole pipeline is hanzoai/ci's build.yml reading hanzo.yml: the gate, the
|
||||
# images and the console site.
|
||||
name: CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ['v*']
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
cicd:
|
||||
uses: hanzoai/ci/.github/workflows/build.yml@v1
|
||||
secrets: inherit
|
||||
@@ -0,0 +1,24 @@
|
||||
# Read by hanzoai/ci build.yml@v1 (.hanzo/workflows/cicd.yml) on the forge.
|
||||
|
||||
test:
|
||||
- name: go
|
||||
run: go test ./...
|
||||
- name: console
|
||||
run: cd frontend && pnpm install --frozen-lockfile && pnpm test && pnpm typecheck
|
||||
|
||||
images:
|
||||
- name: kms
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
repo: ghcr.io/hanzoai/kms
|
||||
- name: kms-fetch
|
||||
context: .
|
||||
dockerfile: Dockerfile.kms-fetch
|
||||
repo: ghcr.io/hanzoai/kms-fetch
|
||||
|
||||
# The console at kms.hanzo.ai: s3://hanzo-sites/hanzo/kms.
|
||||
site:
|
||||
slug: kms
|
||||
dir: frontend/dist
|
||||
build: cd frontend && pnpm install --frozen-lockfile && pnpm build
|
||||
on: [main]
|
||||
Reference in New Issue
Block a user