Push images on release (#11)

This commit is contained in:
Matt White
2021-01-08 16:53:47 +00:00
committed by GitHub
parent ad91a03e77
commit 69da778a62
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ name: Create release
jobs:
build:
name: Create Release
name: create_release
runs-on: ubuntu-latest
steps:
- name: Checkout Teslamate
+3 -3
View File
@@ -92,8 +92,8 @@ jobs:
--label io.hass.url="https://github.com/matt-FFFFFF/hassio-addon-repository/blob/main/teslamate/README.md" \
-t $DOCKER_USERNAME/teslamate-${{ matrix.arch }}:$ADDON_VERSION \
./
if: github.ref != 'refs/heads/main'
- name: Buildx build --push (if main)
if: ${{ github.ref != 'refs/heads/main' }}
- name: Buildx build --push (if main or release)
run: |
DOCKER_CLI_EXPERIMENTAL=enabled sudo docker buildx build \
--pull \
@@ -109,4 +109,4 @@ jobs:
--label io.hass.url="https://github.com/matt-FFFFFF/hassio-addon-repository/blob/main/teslamate/README.md" \
-t $DOCKER_USERNAME/teslamate-${{ matrix.arch }}:$ADDON_VERSION \
./
if: github.ref == 'refs/heads/main'
if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'release' }}