Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

Commit 42384de

Browse files
committed
ci: pin: downstream: 2nd party: Config GitHub CLI via files
1 parent d57c668 commit 42384de

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/pin_downstream.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,14 @@ jobs:
127127
git config user.name "${PIN_PULL_REQUEST_NAME}"
128128
git commit -sam "${COMMIT_MESSAGE}"
129129
git log -n 1 -p
130-
echo "${GH_ACCESS_TOKEN}" | gh auth login --with-token
130+
131+
mkdir -p ~/.config/gh/
132+
echo "github.com:" > ~/.config/gh/hosts.yml
133+
echo " oauth_token: ${GH_ACCESS_TOKEN}" >> ~/.config/gh/hosts.yml
134+
echo " user: token" >> ~/.config/gh/hosts.yml
135+
echo " git_protocol: https" >> ~/.config/gh/hosts.yml
136+
gh auth setup-git
137+
131138
git push -u origin -f "${NEW_BRANCH_WITH_PIN}"
132139
gh pr create --base "${BASE}" --head "${NEW_BRANCH_WITH_PIN}" --title "${COMMIT_MESSAGE}" --body "" | tee pull-request-url
133140
PULL_REQUEST_URL="$(cat pull-request-url)"

0 commit comments

Comments
 (0)