✏️ [CI/CD] Fix CI/CD

This commit is contained in:
Sebastien Clement 2021-05-06 14:07:11 +02:00
parent fc65343045
commit a4b3593ee4

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' || github.ref == 'refs/tags/*' }} 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: |
@ -93,3 +92,4 @@ jobs:
file: ./${{env.TARGET}}/Dockerfile file: ./${{env.TARGET}}/Dockerfile
cache-from: type=registry,ref=${{env.REPOSITORY}}/${{env.IMAGE}}/${{matrix.arch}}:latest cache-from: type=registry,ref=${{env.REPOSITORY}}/${{env.IMAGE}}/${{matrix.arch}}:latest
cache-to: type=inline cache-to: type=inline
context: ./${{env.TARGET}}/