]> cat aescling's git repositories - mastodon.git/commitdiff
Skip Docker Hub login for pull requests (#17625)
authorYamagishi Kazutoshi <ykzts@desire.sh>
Wed, 23 Feb 2022 15:44:16 +0000 (00:44 +0900)
committerGitHub <noreply@github.com>
Wed, 23 Feb 2022 15:44:16 +0000 (16:44 +0100)
* Skip Docker Hub login for pull requests

* Add support pr tag

.github/workflows/build-image.yml

index 92a164c40e1c567ac133e96f66a7cc7711da0734..f8b4a751dc26fb46406ab4f9b35735d3e0a90583 100644 (file)
@@ -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: .