diff --git a/.github/workflows/generate-release-zipfile.yml b/.github/workflows/generate-release-zipfile.yml index 5909ea2..9d3a6aa 100644 --- a/.github/workflows/generate-release-zipfile.yml +++ b/.github/workflows/generate-release-zipfile.yml @@ -22,6 +22,7 @@ jobs: - name: "Github requires checkout for 'uses: ./' (or we could hard write the repository's URL ?)" run: | git init + test -z "$GITHUB_TOKEN" && GITHUB_TOKEN="${{ github.token }}" MY_AUTHENTICATED_URL="$( echo "$GITHUB_SERVER_URL" | sed "s#^\(https\?://\)#\1$GITHUB_TOKEN\@#" )" git remote add origin "$MY_AUTHENTICATED_URL"/"$GITHUB_REPOSITORY" # Little and optional speed optimization diff --git a/action.yml b/action.yml index 4b0878f..82f5b87 100644 --- a/action.yml +++ b/action.yml @@ -36,6 +36,9 @@ runs: # Some optional help for debugging. set -ex + # Compatibility layer Forgejo/Gitea vs Github + test -z "$GITHUB_TOKEN" && GITHUB_TOKEN="${{ github.token }}" + # Compress the input paths into a zip archive # (note: busybox' mktemp doesn't have the --suffix option) MYUPLOAD="$( mktemp -u ).zip"