diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6438929..4767ec9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,6 +19,7 @@ jobs: - name: Retrieve version shell: bash run: | + git config --global --add safe.directory '*' VERSION=$(git describe --abbrev=0) echo "::set-output name=VERSION::$VERSION" id: version @@ -128,6 +129,7 @@ jobs: - name: Retrieve version shell: bash run: | + git config --global --add safe.directory '*' VERSION=$(git describe --abbrev=0) echo "::set-output name=VERSION::$VERSION" id: version diff --git a/Makefile b/Makefile index d0eb632..e019c0b 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ all: generate-version-and-build MAKEFLAGS += --no-print-directory generate-version-and-build: + git config --global --add safe.directory "$(abspath .)" @export GIT_CEILING_DIRECTORIES="$(realpath $(CURDIR)/..)" && \ tag="$$(git describe --tags --abbrev=0 2>/dev/null)" && \ ver="$$(printf 'package main\n\nvar Version = "%s"\n' "$$tag")" && \