Skip to content

Commit b57bc12

Browse files
committed
Login on pull_request
1 parent c90677b commit b57bc12

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

.github/workflows/docker.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: docker
22
on:
33
push:
4-
# TODO: Build on main?
4+
# Build on main
55
branches:
66
- main
77
tags:
@@ -103,14 +103,12 @@ jobs:
103103
${{ runner.os }}-buildx-
104104
105105
- name: Login to Docker Hub registry
106-
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') # Login only on master and tags
107106
uses: docker/login-action@v2
108107
with:
109108
username: ${{ secrets.DOCKERHUB_USERNAME }}
110109
password: ${{ secrets.DOCKERHUB_TOKEN }}
111110

112111
- name: Login to GitHub Container Registry
113-
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') # Login only on master and tags
114112
uses: docker/login-action@v2
115113
with:
116114
registry: ghcr.io
@@ -135,7 +133,7 @@ jobs:
135133
context: '.'
136134
file: Dockerfile
137135
platforms: linux/amd64,linux/arm,linux/arm64,linux/mips64le,linux/ppc64le,linux/riscv64,linux/s390x
138-
push: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') }} # Push only on master and tags
136+
push: true
139137
tags: ${{ steps.meta.outputs.tags }}
140138
labels: ${{ steps.meta.outputs.labels }}
141139
cache-from: type=local,src=/tmp/.buildx-cache

0 commit comments

Comments
 (0)