Skip to content

Commit a02333b

Browse files
authored
Update external-pr.yml
1 parent 82ef421 commit a02333b

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

.github/workflows/external-pr.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,18 @@ jobs:
3737
echo "Checked out PR branch: external-pr-${{ github.event.pull_request.number }}"
3838
git show --summary # Show commit details
3939
40-
- name: Authenticate git for internal repo
41-
env:
42-
GH_TOKEN: ${{ secrets.INTERNAL_REPO_TOKEN }} # gh auth login uses GH_TOKEN
43-
run: |
44-
echo "Attempting gh auth login..."
45-
echo "$GH_TOKEN" | gh auth login --with-token --hostname github.com
46-
gh auth status # This will confirm if login was successful
47-
# This configures git to use the token for github.com operations
48-
# You can inspect what it does by looking at ~/.gitconfig or using:
49-
# git config --global --get-all http.https://github.com/.extraheader
50-
5140
- name: Push branch to Internal Repository (using gh auth)
5241
env:
53-
# INTERNAL_REPO_PAT is not directly used in URL now, gh auth handles it
42+
INTERNAL_REPO_TOKEN: ${{ secrets.INTERNAL_REPO_TOKEN }}
5443
INTERNAL_REPO_GIT_URL: "https://github.com/AMD-ROCm-Internal/aqlprofile.git" # Plain URL
5544
INTERNAL_BRANCH_NAME: "external-pr-${{ github.event.pull_request.number }}"
5645
run: |
46+
unset GH_TOKEN
47+
gh auth logout
48+
echo "Attempting gh auth login..."
49+
echo "$INTERNAL_REPO_TOKEN" | gh auth login --with-token --hostname github.com
50+
gh auth status
51+
5752
echo "Pushing to ${INTERNAL_REPO_GIT_URL} as branch ${INTERNAL_BRANCH_NAME}"
5853
git remote -v # Check existing remotes (origin)
5954
git remote add internal_mirror "${INTERNAL_REPO_GIT_URL}"

0 commit comments

Comments
 (0)