Fix cd missing node in migrate
CI / frontend (push) Canceled after 0s
CI / backend (push) Canceled after 31s

This commit is contained in:
2026-08-10 17:20:46 +08:00
parent d124b83cd4
commit 9144ca7ac1
+16 -6
View File
@@ -78,23 +78,33 @@ jobs:
migrate: migrate:
needs: build-and-push needs: build-and-push
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: # Checkout/setup-* are Node actions and must run on the job host (act_runner
image: mcr.microsoft.com/dotnet/sdk:8.0 # default image). Do not set job-level container: — that replaced the host
# with dotnet/sdk (no node) and broke checkout. Use docker run for the SDK
# instead; the runner already needs Docker for build-and-push.
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Build migration bundle - name: Build migration bundle
run: | run: |
dotnet tool install --global dotnet-ef --version 8.0.4 \ docker run --rm \
|| dotnet tool update --global dotnet-ef --version 8.0.4 -v "$PWD:/src" \
export PATH="$PATH:/root/.dotnet/tools" -w /src \
bash ./scripts/build-api-migration-bundle.sh -e HOME=/tmp \
mcr.microsoft.com/dotnet/sdk:8.0 \
bash -euo pipefail -c '
dotnet tool install --global dotnet-ef --version 8.0.4 \
|| dotnet tool update --global dotnet-ef --version 8.0.4
export PATH="$PATH:/tmp/.dotnet/tools"
bash ./scripts/build-api-migration-bundle.sh
'
cp -f ./artifacts/migrate-api ./migrate-api cp -f ./artifacts/migrate-api ./migrate-api
chmod +x ./migrate-api chmod +x ./migrate-api
# Runs while the previous release is still serving traffic, so every # Runs while the previous release is still serving traffic, so every
# migration must be backwards-compatible with the outgoing image. # migration must be backwards-compatible with the outgoing image.
# See Step 6 — expand-then-contract. # See Step 6 — expand-then-contract.
# Self-contained linux-x64 binary — runs on the host, not inside the SDK image.
- name: Apply migrations - name: Apply migrations
run: ./migrate-api --connection "${{ secrets.PG_CONNECTION_DDL }}" run: ./migrate-api --connection "${{ secrets.PG_CONNECTION_DDL }}"