Fix cd missing node in migrate
This commit is contained in:
+13
-3
@@ -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: |
|
||||||
|
docker run --rm \
|
||||||
|
-v "$PWD:/src" \
|
||||||
|
-w /src \
|
||||||
|
-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 install --global dotnet-ef --version 8.0.4 \
|
||||||
|| dotnet tool update --global dotnet-ef --version 8.0.4
|
|| dotnet tool update --global dotnet-ef --version 8.0.4
|
||||||
export PATH="$PATH:/root/.dotnet/tools"
|
export PATH="$PATH:/tmp/.dotnet/tools"
|
||||||
bash ./scripts/build-api-migration-bundle.sh
|
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 }}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user