forgejo/ci: run build in pazof/yavsc-build-env container #17

Merged
notazof merged 9 commits from feat/postit-release-page into main 2026-08-16 13:50:13 +01:00
Showing only changes of commit 5f50135c7f - Show all commits

ci: drop working-directory, cd into /src/_src explicitly
Some checks failed
Dotnet build and test / log-the-inputs (pull_request) Successful in 9s
Dotnet build and test / build (pull_request) Failing after 2m1s

forgejo-runner v13 does not interpolate ${{ runner.workspace }}
in working-directory: (or ignores the field entirely for docker
containers), so the container tried to chdir to '/_src' (literally)
which does not exist.

The image WORKDIR is /src, so clone directly into /src/_src and cd
into it at the start of each step. Adds an echo of the checkout
SHA + branch state for visibility in the log.
Paul Schneider 2026-08-16 13:27:36 +01:00
Signed by: notazof
GPG key ID: 1DD5D838E5343B06

View file

@ -42,7 +42,7 @@ jobs:
steps: steps:
- name: Clone yavsc - name: Clone yavsc
run: | run: |
cd "$RUNNER_WORKSPACE" cd /src
git clone https://forgejo.pschneider.fr/notazof/yavsc.git _src git clone https://forgejo.pschneider.fr/notazof/yavsc.git _src
cd _src cd _src
if [ -n "${GITHUB_REF:-}" ]; then if [ -n "${GITHUB_REF:-}" ]; then
@ -50,12 +50,10 @@ jobs:
git checkout FETCH_HEAD git checkout FETCH_HEAD
fi fi
git submodule update --init --recursive --depth 1 git submodule update --init --recursive --depth 1
echo "Checked out at $(git rev-parse HEAD) on $(git branch --show-current 2>/dev/null || echo detached HEAD)"
- name: Restore dependencies - name: Restore dependencies
working-directory: ${{ runner.workspace }}/_src run: cd /src/_src && dotnet restore
run: dotnet restore
- name: Build - name: Build
working-directory: ${{ runner.workspace }}/_src run: cd /src/_src && dotnet build --no-restore
run: dotnet build --no-restore
- name: Test - name: Test
working-directory: ${{ runner.workspace }}/_src run: cd /src/_src && dotnet test --no-build --verbosity normal
run: dotnet test --no-build --verbosity normal