Require event_name to be push for Docker Hub

Instead of just checking if it's not pull_request
This commit is contained in:
Finlay Davidson 2022-06-16 09:13:46 +02:00 committed by JF
parent b089fc2c61
commit 4ee3e51605

View File

@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v3
- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
if: github.event_name == 'push'
uses: docker/login-action@v2
with:
username: infinitime
@ -36,7 +36,7 @@ jobs:
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64
builder: ${{ steps.buildx.outputs.name }}
push: ${{ github.event_name != 'pull_request' }}
push: ${{ github.event_name == 'push' }}
tags: infinitime/infinitime-build:latest
cache-from: type=registry,ref=infinitime/infinitime-build:buildcache
cache-to: type=registry,ref=infinitime/infinitime-build:buildcache,mode=max