Build playable Aeternalis foundation and GitOps deployment pipeline

This commit is contained in:
dingo
2026-09-05 12:52:51 -04:00
parent 93703b20bc
commit ff87b8a544
66 changed files with 6567 additions and 0 deletions
+82
View File
@@ -0,0 +1,82 @@
name: Verify, publish, and promote
on:
push:
branches: [master, main]
pull_request:
jobs:
verify:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17-alpine
env:
POSTGRES_USER: aeternalis
POSTGRES_PASSWORD: ci-test-only
POSTGRES_DB: aeternalis_test
options: >-
--health-cmd "pg_isready -U aeternalis -d aeternalis_test"
--health-interval 5s --health-timeout 5s --health-retries 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: "24", cache: npm }
- uses: actions/setup-go@v5
with: { go-version-file: server/go.mod, cache-dependency-path: server/go.sum }
- run: npm ci --no-fund
- run: npm run test:contracts && npm run check && npm run build
- name: Go tests, race detector, and PostgreSQL integration
working-directory: server
env:
TEST_DATABASE_URL: postgres://aeternalis:ci-test-only@postgres:5432/aeternalis_test?sslmode=disable
run: go test -race -count=1 ./...
- name: Go static analysis
working-directory: server
run: go vet ./...
- run: npx playwright install --with-deps chromium
- run: npm run test:e2e
- uses: azure/setup-helm@v4.3.0
- run: helm lint deploy/chart && helm template aeternalis deploy/chart > /tmp/aeternalis.yaml
publish:
if: gitea.event_name == 'push'
needs: verify
runs-on: ubuntu-latest
outputs:
digest: ${{ steps.build.outputs.digest }}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ${{ vars.HARBOR_HOST }}
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
- uses: docker/build-push-action@v6
id: build
with:
context: .
push: true
tags: ${{ vars.HARBOR_HOST }}/${{ vars.HARBOR_PROJECT }}/aeternalis:${{ gitea.sha }}
provenance: true
sbom: true
promote:
if: gitea.event_name == 'push' && vars.GITOPS_REPOSITORY != ''
needs: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: "24" }
- run: npm ci --no-fund
- name: Update GitOps image digest
env:
GITOPS_REPOSITORY: ${{ vars.GITOPS_REPOSITORY }}
GITOPS_BRANCH: ${{ vars.GITOPS_BRANCH }}
GITOPS_VALUES_FILE: ${{ vars.GITOPS_VALUES_FILE }}
GITOPS_USERNAME: ${{ secrets.GITOPS_USERNAME }}
GITOPS_TOKEN: ${{ secrets.GITOPS_TOKEN }}
IMAGE_REPOSITORY: ${{ vars.HARBOR_HOST }}/${{ vars.HARBOR_PROJECT }}/aeternalis
IMAGE_DIGEST: ${{ needs.publish.outputs.digest }}
run: node tools/promote-gitops.mjs