From aacf0f535b80feda7a83248805c1efcd87a0eecf Mon Sep 17 00:00:00 2001 From: phil Date: Sat, 2 Nov 2024 22:31:30 +0100 Subject: [PATCH] CI: unshallow the runner's repo to get the version for building container --- .forgejo/workflows/build.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index c785412..a562f4f 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -31,9 +31,13 @@ jobs: - name: Build package (transpile ts => js) run: ng build - - name: Get the version from git - id: version + - name: Git unshallow - get all history from Git to get the tag for the computation of the version if: ${{ inputs.build }} + run: git pull --unshallow + + - name: Get the version from git + if: ${{ inputs.build }} + id: version run: echo "version=$(git describe --dirty --tags)" >> $GITHUB_OUTPUT - name: Build container