From 78f591cb0a6c9a5c06f14742f0db8144b5ab3f2c Mon Sep 17 00:00:00 2001 From: Viktor Delev Date: Sun, 1 Dec 2024 14:38:59 +0100 Subject: [PATCH 1/2] 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: From f6de9ba04c039e7994c4ade575923c9dca3f6d79 Mon Sep 17 00:00:00 2001 From: Viktor Delev Date: Mon, 2 Dec 2024 08:58:37 +0100 Subject: [PATCH 2/2] revert to bot repo token --- .github/workflows/release-post-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-post-merge.yml b/.github/workflows/release-post-merge.yml index a05da881..d2ccc25c 100644 --- a/.github/workflows/release-post-merge.yml +++ b/.github/workflows/release-post-merge.yml @@ -37,7 +37,7 @@ permissions: env: GITHUB_USER: "datavisyn-bot" - GITHUB_TOKEN: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }} + GITHUB_TOKEN: ${{ secrets.DATAVISYN_BOT_REPO_TOKEN }} jobs: post_release: