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
defaults:
run:
# Git Bash (bundled with Git for Windows) — needed for `$REGISTRY` and
# the heredoc-style multi-line steps below.
shell: bash
# Windows PowerShell (always present). NOTE: do NOT use `shell: bash`
# here — act_runner in Windows host mode mislocates the generated .sh
# script ("No such file or directory"). PowerShell avoids that bug.
shell: powershell
env:
REGISTRY: git.golife.love/chrischen
steps:
@@ -27,17 +28,21 @@ jobs:
run: dotnet test API/ROLAC.API.Tests/ROLAC.API.Tests.csproj -c Release
- 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
run: |
docker build -t "$REGISTRY/rolac-api:latest" -t "$REGISTRY/rolac-api:${{ github.sha }}" ./API
docker build -t "$REGISTRY/rolac-app:latest" -t "$REGISTRY/rolac-app:${{ github.sha }}" ./APP
docker build -t "$env:REGISTRY/rolac-api:latest" -t "$env:REGISTRY/rolac-api:${{ github.sha }}" ./API
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
run: |
docker push --all-tags "$REGISTRY/rolac-api"
docker push --all-tags "$REGISTRY/rolac-app"
docker push --all-tags "$env:REGISTRY/rolac-api"
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
# /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.
- .NET 8 SDK on PATH (`dotnet test` runs on this machine).
- **Git for Windows** installed — the job uses `shell: bash` (Git Bash) for the
multi-line `docker build`/`push` steps.
- The `build-push` job uses `shell: powershell`. Do **not** switch it to
`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)