Skip to content

Commit 9312339

Browse files
authored
Update docker-image.yml
1 parent 9f0b139 commit 9312339

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/docker-image.yml

+21
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,24 @@ jobs:
1616
- uses: actions/checkout@v3
1717
- name: Build the Docker image
1818
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
19+
20+
- name: Log in to the Container registry
21+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
22+
with:
23+
registry: ${{ env.REGISTRY }}
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Extract metadata (tags, labels) for Docker
28+
id: meta
29+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
30+
with:
31+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }
32+
33+
- name: Build and push Docker image
34+
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
35+
with:
36+
context: .
37+
push: true
38+
tags: ${{ steps.meta.outputs.tags }}
39+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)