From bae33974b3b0090c890c13e8caf62cccc532a525 Mon Sep 17 00:00:00 2001 From: Manuel Bustillo Date: Sat, 7 Sep 2024 15:57:06 +0200 Subject: [PATCH] Match image name with repo name --- .github/workflows/build.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 28830a7..16e72bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build docker image +name: Build Nginx-based docker image on: push: branches: @@ -14,18 +14,20 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub + + - name: Login to the private Docker registry uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ${{ secrets.PRIVATE_REGISTRY_HOST }} + username: ${{ secrets.PRIVATE_REGISTRY_USERNAME }} + password: ${{ secrets.PRIVATE_REGISTRY_TOKEN }} - name: Build and push uses: docker/build-push-action@v6 with: context: . push: ${{ github.event_name != 'pull_request' }} - tags: bustikiller/wedding-planner-frontend:latest + tags: | + ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:latest cache-from: type=registry,ref=user/app:latest cache-to: type=inline \ No newline at end of file -- 2.47.1