Skip to content

Commit c10559a

Browse files
authored
Add docker push based ongit tag (#68)
* push to github based on github tag * push to github based on github tag
1 parent 622b342 commit c10559a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/docker-hub-image.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
username: ${{ secrets.DOCKER_HUB_USERNAME }}
5353
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
5454
- name: Extract metadata (tags, labels) for Docker
55-
if: github.event_name != 'pull_request'
55+
if: github.ref == 'refs/heads/main'
5656
id: meta
5757
uses: docker/metadata-action@v5
5858
with:
@@ -75,7 +75,7 @@ jobs:
7575
with:
7676
context: .
7777
file: ${{ matrix.dockerfile }}
78-
push: ${{ github.event_name != 'pull_request' }}
78+
push: ${{ github.ref == 'refs/heads/main' }}
7979
tags: ${{ steps.meta.outputs.tags }}
8080
labels: ${{ steps.meta.outputs.labels }}
8181
- name: Build and push tags

0 commit comments

Comments
 (0)