Skip to content

Commit b3791a1

Browse files
feat:final workflow
1 parent dfa5be4 commit b3791a1

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

.github/workflows/build.yaml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,17 @@ jobs:
2929
id: meta
3030
uses: docker/metadata-action@v4
3131
with:
32-
3332
images: |
34-
"${{env.DOCKER_REGISTRY}}/${{secrets.DOCKER_USERNAME}}/${{ env.DOCKER_REPO }}"
33+
"${{ env.DOCKER_REGISTRY }}/${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}"
3534
tags: |
3635
type=raw,value={{branch}}-sha-{{sha}}
3736
38-
- name: Docker build
39-
run: |
40-
docker build -t ${{ steps.meta.outputs.images }}:${{ steps.meta.outputs.tags }} .
41-
42-
43-
- name: Docker push
44-
run: |
45-
docker push ${{ steps.meta.outputs.images }}:${{ steps.meta.outputs.tags }}
46-
37+
- name: Build and push Docker image
38+
uses: docker/build-push-action@v4
39+
with:
40+
context: ${{ env.CONTEXT_PATH }}
41+
file: ${{ env.DOCKER_PATH }}
42+
push: true
43+
tags: ${{ steps.meta.outputs.tags }}
44+
labels: ${{ steps.meta.outputs.labels }}
45+

0 commit comments

Comments
 (0)