ci: migrate to canonical docker-build reusable (#7)

- Add docker.yml using hanzoai/.github/.github/workflows/docker-build.yml@main
- Add workflow-sanity.yml to enforce canonical CI contract
- Remove bespoke docker build steps from existing workflows

Refs: hanzoai/.github canonical Docker CI contract.
This commit is contained in:
2026-04-23 19:12:19 -07:00
committed by GitHub
parent 3075de3aad
commit 385ba253d3
3 changed files with 37 additions and 46 deletions
+11 -46
View File
@@ -1,63 +1,28 @@
name: Deploy Docs
on:
push:
branches: [main]
workflow_dispatch:
branches:
- main
workflow_dispatch: null
permissions:
contents: read
packages: write
id-token: write
concurrency:
group: deploy-docs
cancel-in-progress: true
env:
REGISTRY: ghcr.io
IMAGE_NAME: luxfi/lux-docs
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest
type=sha
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
deploy:
runs-on: ubuntu-latest
needs: build-and-push
steps:
- name: Deploy to cluster
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.K8S_HOST }}
username: ${{ secrets.K8S_USER }}
key: ${{ secrets.K8S_SSH_KEY }}
script: |
kubectl rollout restart deployment/lux-docs -n lux-ns
- name: Deploy to cluster
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.K8S_HOST }}
username: ${{ secrets.K8S_USER }}
key: ${{ secrets.K8S_SSH_KEY }}
script: |
kubectl rollout restart deployment/lux-docs -n lux-ns
+17
View File
@@ -0,0 +1,17 @@
name: Docker
on:
workflow_dispatch:
push:
branches: [main, dev, test]
tags: ['v*']
permissions:
contents: read
packages: write
jobs:
docker:
uses: hanzoai/.github/.github/workflows/docker-build.yml@main
with:
image: ghcr.io/luxfi/docs
secrets: inherit
+9
View File
@@ -0,0 +1,9 @@
name: Workflow Sanity
on:
pull_request:
push:
branches: [main]
jobs:
sanity:
uses: hanzoai/.github/.github/workflows/workflow-sanity.yml@main