Skip to content

Commit 0b3931a

Browse files
committed
mhh
1 parent c3ba3c9 commit 0b3931a

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,15 @@ jobs:
1919
registry: ${{ env.REGISTRY }}
2020
username: ${{ github.actor }}
2121
password: ${{ secrets.GITHUB_TOKEN }}
22-
- run: echo "NAME=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:$(date +%s)" >> $GITHUB_OUTPUT
23-
id: tag
24-
- name: Push the Docker image
22+
- name: Extract metadata (tags, labels) for Docker
23+
id: meta
24+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
25+
with:
26+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
27+
- name: Build and push Docker image
2528
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
2629
with:
30+
context: .
2731
push: true
28-
tags: ${{ steps.tag.outputs.NAME }}
29-
file: ./Dockerfile
32+
tags: ${{ steps.meta.outputs.tags }}
33+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)