diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d9d8615..49ed525e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -120,24 +120,25 @@ jobs: docker push $NEW_TAG done - - name: Build for diff and push - id: docker_build - uses: docker/build-push-action@v2 - with: - push: false - load: true - file: ${{ matrix.image }} - tags: ${{ join(matrix.tags) }} - platforms: "linux/amd64" - -# - name: Build and push +# - name: Build for diff and push # id: docker_build # uses: docker/build-push-action@v2 # with: -# push: ${{ github.ref == 'refs/heads/master' }} +# push: false +# load: true # file: ${{ matrix.image }} # tags: ${{ join(matrix.tags) }} -# platforms: ${{ join(matrix.platforms) }} +# platforms: "linux/amd64" + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + push: ${{ github.ref == 'refs/heads/master' }} + load: ${{ github.ref != 'refs/heads/master' }} + file: ${{ matrix.image }} + tags: ${{ join(matrix.tags) }} + platforms: ${{ github.ref == 'refs/heads/master' && join(matrix.platforms) || 'linux/amd64' }} - name: Current image report run: | @@ -161,7 +162,8 @@ jobs: echo "EOF" >> $GITHUB_ENV - name: Send Slack Notification -# if: ${{ github.ref == 'refs/heads/master' }} + if: ${{ env.DIFF_OUTPUT != '' }} +# if: ${{ github.ref == 'refs/heads/master' && env.DIFF_OUTPUT != '' }} uses: slackapi/slack-github-action@v1.24.0 with: payload: |