Skip to content

Commit 04bc224

Browse files
committed
Fix: Add condition to login to Aliyun Registry only for non-forked PRs
1 parent a02d678 commit 04bc224

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/devcontainer.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,11 @@ jobs:
4444
password: ${{ secrets.GITHUB_TOKEN }}
4545

4646
- name: Login to Aliyun Registry
47+
# 只有在不是由 fork 的 PR 触发时才执行
48+
if: github.event.pull_request.head.repo.full_name == github.repository
4749
uses: docker/login-action@v3
4850
with:
4951
registry: dp-harbor-registry.us-east-1.cr.aliyuncs.com
50-
# AliCloud automatically mirrors to registry.dp.tech
5152
username: ${{ secrets.DP_HARBOR_USERNAME }}
5253
password: ${{ secrets.DP_HARBOR_PASSWORD }}
5354

0 commit comments

Comments
 (0)