Skip to content

Commit ea111d9

Browse files
authored
Push changes to the default branch to DockerHub as latest (#42)
1 parent c7d7de6 commit ea111d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/build-and-push.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ name: build-and-push-docker-image
22

33
on:
44
push:
5-
branches: [ main ]
6-
release:
7-
types:
8-
- created
5+
branches:
6+
- main
97

108
jobs:
119
push-image:
@@ -26,6 +24,8 @@ jobs:
2624
uses: docker/metadata-action@v3
2725
with:
2826
images: aptible/deploy-demo-app
27+
tags: |
28+
type=raw,value=latest,enable={{is_default_branch}}
2929
3030
- name: Build and push Docker images
3131
uses: docker/build-push-action@v2

0 commit comments

Comments
 (0)