Require event_name to be push for Docker Hub
Instead of just checking if it's not pull_request
This commit is contained in:
parent
b089fc2c61
commit
4ee3e51605
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name == 'push'
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: infinitime
|
username: infinitime
|
||||||
|
@ -36,7 +36,7 @@ jobs:
|
||||||
file: ./docker/Dockerfile
|
file: ./docker/Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
builder: ${{ steps.buildx.outputs.name }}
|
builder: ${{ steps.buildx.outputs.name }}
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name == 'push' }}
|
||||||
tags: infinitime/infinitime-build:latest
|
tags: infinitime/infinitime-build:latest
|
||||||
cache-from: type=registry,ref=infinitime/infinitime-build:buildcache
|
cache-from: type=registry,ref=infinitime/infinitime-build:buildcache
|
||||||
cache-to: type=registry,ref=infinitime/infinitime-build:buildcache,mode=max
|
cache-to: type=registry,ref=infinitime/infinitime-build:buildcache,mode=max
|
||||||
|
|
Loading…
Reference in a new issue