浏览代码

fix: Prevent Docker Hub login during pull requests

Yeuoly 4 月之前
父节点
当前提交
fce99c8dc7
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      .github/workflows/build-push.yml

+ 1 - 0
.github/workflows/build-push.yml

@@ -55,6 +55,7 @@ jobs:
 
 
       - name: Login to Docker Hub
       - name: Login to Docker Hub
         uses: docker/login-action@v2
         uses: docker/login-action@v2
+        if: github.event_name != 'pull_request'
         with:
         with:
           username: ${{ env.DOCKERHUB_USER }}
           username: ${{ env.DOCKERHUB_USER }}
           password: ${{ env.DOCKERHUB_TOKEN }}
           password: ${{ env.DOCKERHUB_TOKEN }}