about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2022-02-24 00:44:16 +0900
committerGitHub <noreply@github.com>2022-02-23 16:44:16 +0100
commitb950807fd2eec410062abd91c820cdfdb7fac353 (patch)
tree7bfed75754368cae02c79825c72487bcac18afb4
parentd21bedc492aec0989c68cc6ec5708dbac30fc6dd (diff)
Skip Docker Hub login for pull requests (#17625)
* Skip Docker Hub login for pull requests

* Add support pr tag
-rw-r--r--.github/workflows/build-image.yml2
1 files changed, 2 insertions, 0 deletions
diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml
index 92a164c40..f8b4a751d 100644
--- a/.github/workflows/build-image.yml
+++ b/.github/workflows/build-image.yml
@@ -21,6 +21,7 @@ jobs:
         with:
           username: ${{ secrets.DOCKERHUB_USERNAME }}
           password: ${{ secrets.DOCKERHUB_TOKEN }}
+        if: github.event_name != 'pull_request'
       - uses: docker/metadata-action@v3
         id: meta
         with:
@@ -30,6 +31,7 @@ jobs:
           tags: |
             type=edge,branch=main
             type=semver,pattern={{ raw }}
+            type=ref,event=pr
       - uses: docker/build-push-action@v2
         with:
           context: .