From 122dccb6def940b9ead4381135b49c4e7f4e4593 Mon Sep 17 00:00:00 2001 From: Alessio Date: Sun, 1 Jun 2025 11:35:53 -0400 Subject: [PATCH] Suppress some sensitive output and reduce noise on git-fetch --- action.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 50a9e87..55a0d62 100644 --- a/action.yml +++ b/action.yml @@ -5,12 +5,14 @@ runs: using: "composite" steps: - run: | - set -x set -e + basicauth=$(echo -n "x-access-token:${{ github.token }}" | base64) + echo "git config --local http.$GITHUB_SERVER_URL.extraheader \"Authorization: basic [...]\"" + git config --local http.$GITHUB_SERVER_URL.extraheader "Authorization: basic ${basicauth}" + + set -x git init git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" - basicauth=$(echo -n "x-access-token:${{ github.token }}" | base64) - git config --local http.$GITHUB_SERVER_URL.extraheader "AUTHORIZATION: basic ${basicauth}" - git fetch origin "$GITHUB_REF" + git fetch --quiet origin "$GITHUB_REF" git checkout "$GITHUB_REF_NAME" shell: bash