From a1ef3b5a8d641c1853384dd854f8697a9d5eb498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Bani=C4=87?= Date: Thu, 13 Apr 2023 16:45:05 +0200 Subject: [PATCH] Add conditional to DockerHub login --- .github/workflows/ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3fcfd8..ea7c721 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: paths-ignore: - .gitignore - "*.md" - + jobs: pytest: runs-on: ubuntu-latest @@ -58,7 +58,9 @@ jobs: uses: docker/setup-buildx-action@v2 - name: Login to DockerHub - if: "${{ steps.docker_meta.outcome == 'success' }}" + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + if: "${{ env.DOCKER_USERNAME != '' }}" uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} @@ -82,7 +84,7 @@ jobs: platforms: linux/amd64,linux/arm64 push: false tags: jellyplex-watched:action - + - name: Build Push id: build_push if: "${{ steps.docker_meta.outcome == 'success' }}"