From ba8c1080096bbe1a330043f644face9aff79aaa2 Mon Sep 17 00:00:00 2001 From: 21120447 Date: Mon, 24 Jun 2024 01:58:15 +0700 Subject: [PATCH] fix: github actions deploy docker hub --- .github/workflows/docker-image.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 5d6cf7f..ddeeb11 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -7,6 +7,8 @@ on: branches: [ "dev", "main" ] env: + # Use docker.io for Docker Hub if empty + REGISTRY: docker.io # github.repository as / IMAGE_NAME: ${{ github.repository }} @@ -46,12 +48,13 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.IMAGE_NAME }} + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image uses: docker/build-push-action@v5 with: context: . + dockerfile: Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}