add a tag for a docker image

This commit is contained in:
Anton Pates 2023-08-18 15:43:09 +00:00
parent c569a20425
commit 6cc8641909

View file

@ -14,9 +14,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag ghcr.io/g-core/cert-manager-webhook-gcore:latest
- name: Login to registry
uses: docker/login-action@v2
with:
@ -24,5 +21,13 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push the Docker image
run: docker push ghcr.io/g-core/cert-manager-webhook-gcore:latest
- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
push: true
context: .
file: ./Dockerfile
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.ref }}