feat : overwite buzz.sudloh.com/guide
CI / Verify application and manifests (push) Successful in 1m27s
CI / Build immutable images and deploy (push) Failing after 5m58s

This commit is contained in:
2026-09-17 21:55:16 +07:00 Unverified
parent 6698dc1302
commit 801386a8ed
31 changed files with 372 additions and 27 deletions
+52
View File
@@ -16,8 +16,40 @@ env:
KUBE_API_SERVER: https://100.112.189.33:6443/
jobs:
verify:
name: Verify application and manifests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Test
run: bun run test
- name: Typecheck
run: bun run typecheck
- name: Lint
run: bun run lint
- name: Set up kubectl
uses: azure/setup-kubectl@v4
- name: Validate Kubernetes manifests
run: kubectl kustomize k8s/ >/dev/null
build-and-deploy:
name: Build immutable images and deploy
needs: verify
if: >-
gitea.event_name == 'push' &&
gitea.ref == 'refs/heads/main' &&
@@ -40,6 +72,20 @@ jobs:
.
docker push ${{ env.REGISTRY_IMAGE }}:${{ gitea.sha }}
- name: Build and push public mirror image
run: |
docker build \
--target app \
--build-arg BASE_URL="$BASE_URL" \
--build-arg NEXT_PUBLIC_BASE_PATH=/guide \
--build-arg NEXT_PUBLIC_GOOGLE_ADSENSE_CLIENT_ID="$NEXT_PUBLIC_GOOGLE_ADSENSE_CLIENT_ID" \
--build-arg PUBLIC_MIRROR=true \
--build-arg NEXT_DEPLOYMENT_ID=${{ gitea.sha }} \
--build-arg VCS_REF=${{ gitea.sha }} \
--tag ${{ env.REGISTRY_IMAGE }}:mirror-${{ gitea.sha }} \
.
docker push ${{ env.REGISTRY_IMAGE }}:mirror-${{ gitea.sha }}
- name: Build and push migration image
run: |
docker build \
@@ -138,6 +184,9 @@ jobs:
kubectl --kubeconfig "$KUBECONFIG" --namespace "$DEPLOY_NAMESPACE" set image \
deployment/buzz-sheet \
app="$REGISTRY_IMAGE:$REVISION"
kubectl --kubeconfig "$KUBECONFIG" --namespace "$DEPLOY_NAMESPACE" set image \
deployment/buzz-sheet-mirror \
app="$REGISTRY_IMAGE:mirror-$REVISION"
kubectl --kubeconfig "$KUBECONFIG" --namespace "$DEPLOY_NAMESPACE" set image \
deployment/buzz-sheet-worker \
worker="$REGISTRY_IMAGE:$REVISION"
@@ -147,6 +196,9 @@ jobs:
kubectl --kubeconfig "$KUBECONFIG" --namespace "$DEPLOY_NAMESPACE" rollout status \
deployment/buzz-sheet \
--timeout=10m
kubectl --kubeconfig "$KUBECONFIG" --namespace "$DEPLOY_NAMESPACE" rollout status \
deployment/buzz-sheet-mirror \
--timeout=10m
kubectl --kubeconfig "$KUBECONFIG" --namespace "$DEPLOY_NAMESPACE" rollout status \
deployment/buzz-sheet-worker \
--timeout=10m