fix(actions): don't login/push on forks (#22)

This commit is contained in:
Jeroen Op 't Eynde 2021-06-10 23:09:29 +02:00 committed by GitHub
parent 4f0571d7e1
commit d620eb4292
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,6 +37,7 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
if: github.event.pull_request.head.repo.full_name == github.repository
name: Login to DockerHub
uses: docker/login-action@v1
with:
@ -48,7 +49,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
push: ${{ github.event_name != 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
-