diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml index 5445243..3e7825f 100644 --- a/.github/workflows/build-images.yml +++ b/.github/workflows/build-images.yml @@ -31,13 +31,13 @@ jobs: install: true - name: Login to DockerHub uses: docker/login-action@v3 - if: (github.ref != 'refs/heads/master' && github.event_name != 'pull_request') || github.event_name == 'schedule' + if: ${{ github.event_name != 'pull_request' && (github.event_name == 'schedule' || startsWith(github.ref, 'refs/tags/')) }} with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Container Registry uses: docker/login-action@v3 - if: (github.ref != 'refs/heads/master' && github.event_name != 'pull_request') || github.event_name == 'schedule' + if: ${{ github.event_name != 'pull_request' && (github.event_name == 'schedule' || startsWith(github.ref, 'refs/tags/')) }} with: registry: ghcr.io username: privatebin