✏️ [CI/CD] Don't push if PR

This commit is contained in:
Sébastien Clément 2021-05-06 12:14:55 +02:00 committed by GitHub
parent f69606b26f
commit cebb8ade1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,8 +82,7 @@ jobs:
- name: Build and push ${{matrix.arch}} - name: Build and push ${{matrix.arch}}
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
push: ${{ github.ref == 'refs/heads/master' || startsWith('refs/tags/', github.ref) }} push: ${{ github.event_name != 'pull_request' }}
context: ./${{env.TARGET}}
tags: ${{env.TAGS}} tags: ${{env.TAGS}}
labels: io.hass.name=${{env.NAME}}, io.hass.description=${{env.DESCRIPTION}}, io.hass.url=${{env.URL}}, io.hass.arch=${{matrix.arch}}, io.hass.version=${{env.VERSION}}, io.hass.type=addon labels: io.hass.name=${{env.NAME}}, io.hass.description=${{env.DESCRIPTION}}, io.hass.url=${{env.URL}}, io.hass.arch=${{matrix.arch}}, io.hass.version=${{env.VERSION}}, io.hass.type=addon
build-args: | build-args: |