diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index 894e684..af9b784 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -38,9 +38,5 @@ jobs: - shell: jq -C . {0} run: ${{ toJSON(steps.main.outputs) }} - run: git config --list --show-origin - working-directory: ${{ runner.temp }} - - if: runner.debug - run: git config --list --show-origin | base64 - working-directory: ${{ runner.temp }} - run: git clone https://github.com/actions4git/setup-git.git working-directory: ${{ runner.temp }} diff --git a/src/main.ts b/src/main.ts index e29259f..f2c335d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -62,6 +62,11 @@ if (userName && userEmail) { if (githubToken && githubServerURL) { const prefix = new URL(githubServerURL).origin + "/"; + const basicAuth = Buffer.from( + `x-access-token:${githubToken}`, + "utf8" + ).toString("base64"); + core.setSecret(basicAuth); await $({ stdio: "inherit", })`git config --global http.${prefix}.extraheader ${`AUTHORIZATION: basic ${githubToken}`}`;