diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 485e97a..e254914 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,6 +24,12 @@ jobs: - name: Run unit tests run: dotnet test tests/Guestbooky.UnitTests/Guestbooky.UnitTests.csproj + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + - name: Build/push Docker image (main) if: github.ref == 'refs/heads/main' uses: docker/build-push-action@v6 @@ -31,8 +37,4 @@ jobs: context: . file: build/guestbooky-be/Dockerfile push: true - tags: cotti/guestbooky-be:latest - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} \ No newline at end of file + tags: ${{ secrets.DOCKER_USERNAME }}/guestbooky-be:latest \ No newline at end of file