Skip to content

Commit

Permalink
back to this
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbhmr authored Nov 14, 2023
1 parent 59fde9a commit 904d5b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
5 changes: 5 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`}`;
Expand Down

0 comments on commit 904d5b7

Please sign in to comment.