Suppress some sensitive output and reduce noise on git-fetch

This commit is contained in:
wispem-wantex 2025-06-01 12:45:39 -04:00
parent 1f43f98c94
commit e70a85821f

View File

@ -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