From 1e485b37f8a580b98349d926ebc793e726f23f4b Mon Sep 17 00:00:00 2001 From: Luigi311 Date: Thu, 13 Apr 2023 12:56:52 -0600 Subject: [PATCH] Do not publish on PR, fix condition check on build --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f1b82c..63fec60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,8 @@ jobs: with: images: | ${{ secrets.DOCKER_USERNAME }}/jellyplex-watched,enable=${{ secrets.DOCKER_USERNAME != '' }} - ghcr.io/${{ github.repository }} + # Do not push to ghcr.io on PRs due to permission issues + ghcr.io/${{ github.repository }},enable=${{ github.event_name != 'pull_request' }} tags: | type=raw,value=latest,enable=${{ matrix.variant == 'alpine' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} type=raw,value=latest,suffix=-${{ matrix.variant }},enable={{ is_default_branch }} @@ -76,7 +77,7 @@ jobs: - name: Build id: build - if: "${{ steps.docker_meta.outcome == 'skipped' }}" + if: "${{ steps.docker_meta.outputs.tags == '' }}" uses: docker/build-push-action@v3 with: context: . @@ -87,7 +88,7 @@ jobs: - name: Build Push id: build_push - if: "${{ steps.docker_meta.outcome == 'success' }}" + if: "${{ steps.docker_meta.outputs.tags != '' }}" uses: docker/build-push-action@v3 with: context: .