Update runnder
ci-cd-nas / build-push (push) Failing after 11s
ci-cd-nas / deploy (push) Has been skipped

This commit is contained in:
Chris Chen
2026-06-20 22:36:07 -07:00
parent ddced87dc6
commit ef3731ba48
2 changed files with 16 additions and 10 deletions
+13 -8
View File
@@ -15,9 +15,10 @@ jobs:
runs-on: windows runs-on: windows
defaults: defaults:
run: run:
# Git Bash (bundled with Git for Windows) — needed for `$REGISTRY` and # Windows PowerShell (always present). NOTE: do NOT use `shell: bash`
# the heredoc-style multi-line steps below. # here — act_runner in Windows host mode mislocates the generated .sh
shell: bash # script ("No such file or directory"). PowerShell avoids that bug.
shell: powershell
env: env:
REGISTRY: git.golife.love/chrischen REGISTRY: git.golife.love/chrischen
steps: steps:
@@ -27,17 +28,21 @@ jobs:
run: dotnet test API/ROLAC.API.Tests/ROLAC.API.Tests.csproj -c Release run: dotnet test API/ROLAC.API.Tests/ROLAC.API.Tests.csproj -c Release
- name: Registry login - name: Registry login
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login git.golife.love -u "${{ secrets.REGISTRY_USER }}" --password-stdin run: '"${{ secrets.REGISTRY_TOKEN }}" | docker login git.golife.love -u "${{ secrets.REGISTRY_USER }}" --password-stdin'
- name: Build images - name: Build images
run: | run: |
docker build -t "$REGISTRY/rolac-api:latest" -t "$REGISTRY/rolac-api:${{ github.sha }}" ./API docker build -t "$env:REGISTRY/rolac-api:latest" -t "$env:REGISTRY/rolac-api:${{ github.sha }}" ./API
docker build -t "$REGISTRY/rolac-app:latest" -t "$REGISTRY/rolac-app:${{ github.sha }}" ./APP if ($LASTEXITCODE -ne 0) { exit 1 }
docker build -t "$env:REGISTRY/rolac-app:latest" -t "$env:REGISTRY/rolac-app:${{ github.sha }}" ./APP
if ($LASTEXITCODE -ne 0) { exit 1 }
- name: Push images - name: Push images
run: | run: |
docker push --all-tags "$REGISTRY/rolac-api" docker push --all-tags "$env:REGISTRY/rolac-api"
docker push --all-tags "$REGISTRY/rolac-app" if ($LASTEXITCODE -ne 0) { exit 1 }
docker push --all-tags "$env:REGISTRY/rolac-app"
if ($LASTEXITCODE -ne 0) { exit 1 }
# Runs on the NAS runner (label `nas`): host Docker socket mounted and # Runs on the NAS runner (label `nas`): host Docker socket mounted and
# /volume1/docker/rolac bind-mounted at the same path. Deploy ONLY — it just # /volume1/docker/rolac bind-mounted at the same path. Deploy ONLY — it just
+3 -2
View File
@@ -52,8 +52,9 @@ installed Docker Desktop + .NET 8 SDK. The workflow's `build-push` job targets
- Docker Desktop running, and `docker` on PATH. - Docker Desktop running, and `docker` on PATH.
- .NET 8 SDK on PATH (`dotnet test` runs on this machine). - .NET 8 SDK on PATH (`dotnet test` runs on this machine).
- **Git for Windows** installed — the job uses `shell: bash` (Git Bash) for the - The `build-push` job uses `shell: powershell`. Do **not** switch it to
multi-line `docker build`/`push` steps. `shell: bash`: act_runner in Windows host mode mislocates the generated `.sh`
script (`/bin/bash: .../1.sh: No such file or directory`). PowerShell avoids it.
## One-time setup — NAS (the `nas` runner) ## One-time setup — NAS (the `nas` runner)