Skip to content

Commit 5f55f9e

Browse files
committed
update docker-image actions
PUSH するようにしてみた
1 parent 4141bcf commit 5f55f9e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/docker-image.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,15 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v4
17+
18+
- name: Log in to Docker Hub
19+
uses: docker/login-action@v3
20+
with:
21+
username: ${{ secrets.DOCKERHUB_USERNAME }}
22+
password: ${{ secrets.DOCKERHUB_TOKEN }}
23+
1724
- name: Build the Docker image
18-
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
25+
run: docker build . --file Dockerfile --tag ${{ vars.DOCKERHUB_IMAGE_TAG }}
26+
27+
- name: Push the Docker image
28+
run: docker push ${{ vars.DOCKERHUB_IMAGE_TAG }}

0 commit comments

Comments
 (0)