Skip to content

Commit 609563f

Browse files
authored
chore: use PAT token for pull request in e2e test (#275)
Signed-off-by: chlins <[email protected]>
1 parent fc84107 commit 609563f

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/e2e.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,18 @@ jobs:
141141
sudo cp modctl/modctl /bin/modctl
142142
sudo chmod +x /bin/modctl
143143
modctl version
144-
modctl login -u ${{ github.actor }} \
145-
-p ${{ secrets.GITHUB_TOKEN }} \
146-
${{ env.REGISTRY }}
144+
145+
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
146+
echo "Login using PAT for Pull Request"
147+
modctl login -u ${{ github.actor }} \
148+
-p ${{ secrets.CR_PAT }} \
149+
${{ env.REGISTRY }}
150+
else
151+
echo "Login using GITHUB_TOKEN"
152+
modctl login -u ${{ github.actor }} \
153+
-p ${{ secrets.GITHUB_TOKEN }} \
154+
${{ env.REGISTRY }}
155+
fi
147156
148157
- name: Test modctl E2E
149158
run: |

0 commit comments

Comments
 (0)