From 769852640ab78e2f3b5f383653f4b07e9280fc8b Mon Sep 17 00:00:00 2001 From: Alessio Date: Sat, 31 May 2025 21:32:42 -0400 Subject: [PATCH] Move it to an env --- action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index b39024f..4259d2d 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,7 @@ name: "Shell Checkout" description: "Checkout a repo using shell" + + runs: using: "composite" steps: @@ -9,8 +11,10 @@ runs: mkdir -p /tmp/newdir && cd /tmp/newdir git init git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" - basicauth=$(echo -n "x-access-token:${{ secrets.GITHUB_TOKEN }}" | base64) + basicauth=$(echo -n "x-access-token:${token}" | base64) git config --local http.$GITHUB_SERVER_URL.extraheader "AUTHORIZATION: basic ${basicauth}" GIT_TRACE=1 GIT_CURL_VERBOSE=1 git fetch origin "$GITHUB_REF" git checkout "$GITHUB_REF_NAME" shell: bash + env: + token: ${{ secrets.GITHUB_TOKEN }}