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.
This commit is contained in:
Paul Schneider 2026-08-16 13:27:36 +01:00
commit 5f50135c7f
Signed by: notazof
GPG key ID: 1DD5D838E5343B06

View file

@ -42,7 +42,7 @@ jobs:
steps:
- name: Clone yavsc
run: |
cd "$RUNNER_WORKSPACE"
cd /src
git clone https://forgejo.pschneider.fr/notazof/yavsc.git _src
cd _src
if [ -n "${GITHUB_REF:-}" ]; then
@ -50,12 +50,10 @@ jobs:
git checkout FETCH_HEAD
fi
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
working-directory: ${{ runner.workspace }}/_src
run: dotnet restore
run: cd /src/_src && dotnet restore
- name: Build
working-directory: ${{ runner.workspace }}/_src
run: dotnet build --no-restore
run: cd /src/_src && dotnet build --no-restore
- name: Test
working-directory: ${{ runner.workspace }}/_src
run: dotnet test --no-build --verbosity normal
run: cd /src/_src && dotnet test --no-build --verbosity normal