Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kazami139 authored and GitHub Enterprise committed Feb 11, 2023
1 parent 2033602 commit 6f882ea
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,21 @@ jobs:
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v2
with:
registry: containers.vlink.dev
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build the Docker image
run: docker build . --file ${{ DOCKERFILE_PATH }} --tag ${{ IMAGE_REPO }}}/${{ IMAGE_NAME }}:${{ IAMGE_TAG }}

- name: Build and push Docker image with version number
uses: docker/build-push-action@v4
with:
push: true
tags: |
${{ IMAGE_REPO }}}/${{ IMAGE_NAME }}:${{ IAMGE_TAG }}
${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}}/${{ env.IMAGE_NAME }}:${{ env.IAMGE_TAG }}
- name: Retag the image to latest tag
run: docker tag ${{ IMAGE_REPO }}}/${{ IMAGE_NAME }}:${{ IAMGE_TAG }} ${{ IMAGE_REPO }}}/${{ IMAGE_NAME }}:latest

- name: Build and push Docker image with latest
uses: docker/build-push-action@v4
with:
push: true
tags: |
${{ IMAGE_REPO }}}/${{ IMAGE_NAME }}:latest
${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}}/${{ env.IMAGE_NAME }}:latest

0 comments on commit 6f882ea

Please sign in to comment.