forgejo/ci: run build in pazof/yavsc-build-env container #17
1 changed files with 2 additions and 2 deletions
ci: unshallow clone for GitVersion
GitVersion.MsBuild fails on shallow clones ('Repository is a shallow
clone. Git repositories must contain the full history.') because it
walks the git log to compute the SemVer version.
Drop --depth 1 from both the PR ref fetch and the submodule update
so the runner's working tree has full history. The repo is small
enough that the cost is negligible.
commit
cc50a8bbc8
|
|
@ -46,10 +46,10 @@ jobs:
|
||||||
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
|
||||||
git fetch --depth 1 origin "$GITHUB_REF"
|
git fetch origin "$GITHUB_REF"
|
||||||
git checkout FETCH_HEAD
|
git checkout FETCH_HEAD
|
||||||
fi
|
fi
|
||||||
git submodule update --init --recursive --depth 1
|
git submodule update --init --recursive
|
||||||
echo "Checked out at $(git rev-parse HEAD) on $(git branch --show-current 2>/dev/null || echo detached HEAD)"
|
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
|
||||||
run: cd /src/_src && dotnet restore
|
run: cd /src/_src && dotnet restore
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue