keep .git on build to extract version from tag

Otherwise the version is empty and --version does not work

Fixes: https://code.forgejo.org/forgejo/runner/issues/14
pull/15/head
Earl Warren 2023-04-03 16:42:45 +02:00
parent 0048a1dfbc
commit 56909d2f20
No known key found for this signature in database
GPG Key ID: 0579CB2928A78A00
2 changed files with 4 additions and 2 deletions

View File

@ -1,3 +1,2 @@
.git
Dockerfile
forgejo-runner

View File

@ -48,4 +48,7 @@ jobs:
# Minimal sanity checks. e2e test is for the setup-forgejo action
# and the infrastructure playbook.
#
curl -sS $url/root/runner/releases/download/v1.2.3/forgejo-runner-amd64 > /dev/null
curl -L -sS $url/root/runner/releases/download/v1.2.3/forgejo-runner-amd64 > forgejo-runner
chmod +x forgejo-runner
./forgejo-runner --version | grep 1.2.3