From 78f591cb0a6c9a5c06f14742f0db8144b5ab3f2c Mon Sep 17 00:00:00 2001 From: Viktor Delev Date: Sun, 1 Dec 2024 14:38:59 +0100 Subject: [PATCH] fix for failing git authentication --- .github/workflows/release-post-merge.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-post-merge.yml b/.github/workflows/release-post-merge.yml index 920ac1d6..a05da881 100644 --- a/.github/workflows/release-post-merge.yml +++ b/.github/workflows/release-post-merge.yml @@ -37,12 +37,22 @@ permissions: env: GITHUB_USER: "datavisyn-bot" - GITHUB_TOKEN: ${{ secrets.DATAVISYN_BOT_REPO_TOKEN }} + GITHUB_TOKEN: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }} jobs: post_release: runs-on: ubuntu-22.04 steps: + - name: Git config + run: | + if [ -f ~/.gitconfig ]; then + rm ~/.gitconfig + touch ~/.gitconfig + fi + git config --global --replace-all url."https://$GITHUB_TOKEN@github.com/".insteadOf ssh://git@github.com/ + git config --add --global url."https://$GITHUB_TOKEN@github".insteadOf https://github + git config --add --global url."https://$GITHUB_TOKEN@github.com/".insteadOf git@github.com: + - name: Checkout Repository uses: actions/checkout@v4 with: