Update runnder
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user