Skip to content

Commit 380fcfa

Browse files
authored
Merge pull request ytabuchi#7 from XLsoft-Corporation/master
update ci
2 parents f0ad3c7 + 6040450 commit 380fcfa

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/docker-image.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ jobs:
2121
with:
2222
username: ${{ secrets.DOCKERHUB_USERNAME }}
2323
password: ${{ secrets.DOCKERHUB_TOKEN }}
24-
24+
2525
- name: Build the Docker image
26-
run: docker build . --file Dockerfile --tag ${{ vars.DOCKERHUB_IMAGE_TAG }}
26+
run: docker build . --file Dockerfile --tag ${{ vars.DOCKERHUB_IMAGE_NAME }}:$(date +%Y%m%d)
2727

2828
- name: Push the Docker image
29-
run: docker push ${{ vars.DOCKERHUB_IMAGE_TAG }}
29+
run: docker push ${{ vars.DOCKERHUB_IMAGE_NAME }}:$(date +%Y%m%d)
30+
31+
- name: Push the Docker image with latest tag
32+
run: docker tag ${{ vars.DOCKERHUB_IMAGE_NAME }}:$(date +%Y%m%d) ${{ vars.DOCKERHUB_IMAGE_NAME }}:latest && docker push ${{ vars.DOCKERHUB_IMAGE_NAME }}:latest

0 commit comments

Comments
 (0)