File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 1414
1515jobs :
1616 docker :
17- # Need's repo owner login creds
18- if : |
19- (github.event_name == 'pull_request' && github.event.pull_request.user.login == github.repository_owner) ||
20- github.actor == github.repository_owner
2117 runs-on : ubuntu-latest
2218 steps :
2319 - name : Checkout
@@ -44,11 +40,13 @@ jobs:
4440 uses : docker/setup-buildx-action@v1
4541 - name : Login to DockerHub
4642 uses : docker/login-action@v1
43+ if : github.event.ref_type == 'tag' || github.event_name == 'workflow_dispatch'
4744 with :
4845 username : ${{ secrets.DOCKERHUB_USERNAME }}
4946 password : ${{ secrets.DOCKERHUB_TOKEN }}
5047 - name : Login to GitHub Container Registry
5148 uses : docker/login-action@v1
49+ if : github.event.ref_type == 'tag' || github.event_name == 'workflow_dispatch'
5250 with :
5351 registry : ghcr.io
5452 username : ${{ github.repository_owner }}
5856 with :
5957 context : .
6058 platforms : ${{ github.event.ref_type == 'tag' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
61- push : true
59+ push : ${{ github.event.ref_type == 'tag' || github.event_name == 'workflow_dispatch' }}
6260 tags : ${{ steps.meta.outputs.tags }}
6361 labels : ${{ steps.meta.outputs.labels }}
6462 - name : Docker Hub Description
You can’t perform that action at this time.
0 commit comments