From 41450123da966403632baf0d86273cc812b87496 Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Mon, 26 Feb 2024 17:58:14 +1030 Subject: [PATCH 01/18] test publish_docker --- .github/workflows/publish_docker.yaml | 48 +++++++++++++++++---------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/.github/workflows/publish_docker.yaml b/.github/workflows/publish_docker.yaml index dbdab77d..237bbdcd 100644 --- a/.github/workflows/publish_docker.yaml +++ b/.github/workflows/publish_docker.yaml @@ -6,38 +6,52 @@ on: workflow_dispatch: jobs: - publish: - name: Publish + build: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: [ + {buildx: linux/amd64, target_arch: amd64}, + {buildx: linux/arm/v7, target_arch: armv7}, + {buildx: linux/arm/v7, target_arch: armhf}, + {buildx: linux/arm64, target_arch: aarch64} + ] steps: - name: Checkout the repository uses: actions/checkout@v4 - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: - # list of Docker images to use as base name for tags images: | davidusb/emhass-docker-standalone - # generate Docker tags based on the following events/attributes tags: | type=semver,pattern={{version}} type=raw,value=latest - name: Set up QEMU uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push + - name: Build and push by digest + id: build uses: docker/build-push-action@v5 with: context: . - platforms: linux/amd64,linux/arm64 - push: true - build-args: build_version=standalone - tags: ${{ steps.meta.outputs.tags }} + platforms: ${{ matrix.platform.buildx }} + build-args: | + build_version=standalone + TARGETARCH=${{ matrix.platform.target_arch }} labels: ${{ steps.meta.outputs.labels }} + tags: ${{ steps.meta.outputs.tags }} + outputs: type=image,name=davidusb/emhass-docker-standalone,push-by-digest=true,name-canonical=true,push=true + - name: Export digest + run: | + mkdir -p /tmp/digests + digest="${{ steps.build.outputs.digest }}" + touch "/tmp/digests/${digest#sha256:}" + - name: Upload digest + uses: actions/upload-artifact@v4 + with: + name: digests-${{ matrix.platform.target_arch }} + path: /tmp/digests/* + if-no-files-found: error + retention-days: 1 \ No newline at end of file From a87e6a7e8b1bc2fac0784705a893385c46fa8c7b Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Mon, 26 Feb 2024 18:02:51 +1030 Subject: [PATCH 02/18] publish docker, edit --- .github/workflows/publish_docker.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish_docker.yaml b/.github/workflows/publish_docker.yaml index 237bbdcd..61599c0d 100644 --- a/.github/workflows/publish_docker.yaml +++ b/.github/workflows/publish_docker.yaml @@ -31,6 +31,8 @@ jobs: type=raw,value=latest - name: Set up QEMU uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Build and push by digest id: build uses: docker/build-push-action@v5 From 1d0adc2b03f7083b17f59c63fe9cb3d1851e1f9b Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Mon, 26 Feb 2024 18:23:36 +1030 Subject: [PATCH 03/18] init docker build test --- .github/workflows/docker-build-test.yaml | 52 +++++++++++++++++++ ...h_docker.yaml => publish_docker copy.yaml} | 1 + 2 files changed, 53 insertions(+) create mode 100644 .github/workflows/docker-build-test.yaml rename .github/workflows/{publish_docker.yaml => publish_docker copy.yaml} (95%) diff --git a/.github/workflows/docker-build-test.yaml b/.github/workflows/docker-build-test.yaml new file mode 100644 index 00000000..91a7f118 --- /dev/null +++ b/.github/workflows/docker-build-test.yaml @@ -0,0 +1,52 @@ +#This action test builds EMHASS standalone Docker images, in each artitectire, then uploads the image as an artifact. +name: "Publish Docker" + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: [ + {buildx: linux/amd64, target_arch: amd64}, + {buildx: linux/arm/v7, target_arch: armv7}, + {buildx: linux/arm/v7, target_arch: armhf}, + {buildx: linux/arm64, target_arch: aarch64} + ] + steps: + - name: Checkout the repository + uses: actions/checkout@v4 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: | + davidusb/emhass-docker-standalone + tags: | + type=semver,pattern={{version}} + type=raw,value=latest + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push by digest + id: build + uses: docker/build-push-action@v5 + with: + context: . + platforms: ${{ matrix.platform.buildx }} + build-args: | + build_version=standalone + TARGETARCH=${{ matrix.platform.target_arch }} + labels: ${{ steps.meta.outputs.labels }} + tags: ${{ steps.meta.outputs.tags }} + load: true + - name: Test #assume docker fail with missing retrieve_hass_conf + run: docker run -it -p 5000:5000 --name emhass-container emhass/docker | grep -q retrieve_hass_conf diff --git a/.github/workflows/publish_docker.yaml b/.github/workflows/publish_docker copy.yaml similarity index 95% rename from .github/workflows/publish_docker.yaml rename to .github/workflows/publish_docker copy.yaml index 61599c0d..aa906f81 100644 --- a/.github/workflows/publish_docker.yaml +++ b/.github/workflows/publish_docker copy.yaml @@ -1,3 +1,4 @@ +#template modified from: https://docs.docker.com/build/ci/github-actions/multi-platform/ name: "Publish Docker" on: From aebced3f8ab1c2b37b16768f07588c78b29140d9 Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Mon, 26 Feb 2024 18:59:52 +1030 Subject: [PATCH 04/18] docker test, teak --- .github/workflows/docker-build-test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build-test.yaml b/.github/workflows/docker-build-test.yaml index 91a7f118..5e917576 100644 --- a/.github/workflows/docker-build-test.yaml +++ b/.github/workflows/docker-build-test.yaml @@ -1,5 +1,5 @@ -#This action test builds EMHASS standalone Docker images, in each artitectire, then uploads the image as an artifact. -name: "Publish Docker" +#This action test builds EMHASS standalone Docker images, in each artitectire. +name: "Test Docker Stanadlone" on: push: From cb4c457f4e7c06b77897d721f9bf0073383f4f0c Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Mon, 26 Feb 2024 19:03:32 +1030 Subject: [PATCH 05/18] publish_docker.yaml add merge --- ...h_docker copy.yaml => publish_docker.yaml} | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) rename .github/workflows/{publish_docker copy.yaml => publish_docker.yaml} (58%) diff --git a/.github/workflows/publish_docker copy.yaml b/.github/workflows/publish_docker.yaml similarity index 58% rename from .github/workflows/publish_docker copy.yaml rename to .github/workflows/publish_docker.yaml index aa906f81..e4bd267f 100644 --- a/.github/workflows/publish_docker copy.yaml +++ b/.github/workflows/publish_docker.yaml @@ -34,6 +34,11 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push by digest id: build uses: docker/build-push-action@v5 @@ -57,4 +62,35 @@ jobs: name: digests-${{ matrix.platform.target_arch }} path: /tmp/digests/* if-no-files-found: error - retention-days: 1 \ No newline at end of file + retention-days: 1 + merge: + runs-on: ubuntu-latest + needs: + - build + steps: + - name: Download digests + uses: actions/download-artifact@v4 + with: + path: /tmp/digests + pattern: digests-* + merge-multiple: true + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: davidusb/emhass-docker-standalone + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Create manifest list and push + working-directory: /tmp/digests + run: | + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(printf 'davidusb/emhass-docker-standalone@sha256:%s ' *) + - name: Inspect image + run: | + docker buildx imagetools inspect davidusb/emhass-docker-standalone:${{ steps.meta.outputs.version }} \ No newline at end of file From 1f61e541519e046f087e0fb09d3a74da978d4da1 Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Mon, 26 Feb 2024 19:13:46 +1030 Subject: [PATCH 06/18] test test --- .github/workflows/docker-build-test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build-test.yaml b/.github/workflows/docker-build-test.yaml index 5e917576..4916b0cc 100644 --- a/.github/workflows/docker-build-test.yaml +++ b/.github/workflows/docker-build-test.yaml @@ -46,7 +46,7 @@ jobs: build_version=standalone TARGETARCH=${{ matrix.platform.target_arch }} labels: ${{ steps.meta.outputs.labels }} - tags: ${{ steps.meta.outputs.tags }} + tags: emhass/test load: true - name: Test #assume docker fail with missing retrieve_hass_conf - run: docker run -it -p 5000:5000 --name emhass-container emhass/docker | grep -q retrieve_hass_conf + run: docker run -it emhass/test From fb1b72802c830c81a3c56cbe3bf44fbf7e6e8908 Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Mon, 26 Feb 2024 20:45:40 +1030 Subject: [PATCH 07/18] test test --- .github/workflows/docker-build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-test.yaml b/.github/workflows/docker-build-test.yaml index 4916b0cc..5da06f13 100644 --- a/.github/workflows/docker-build-test.yaml +++ b/.github/workflows/docker-build-test.yaml @@ -49,4 +49,4 @@ jobs: tags: emhass/test load: true - name: Test #assume docker fail with missing retrieve_hass_conf - run: docker run -it emhass/test + run: docker run -it emhass/test | grep -q retrieve_hass_conf From bf0aa304ba2eb71d470bedf1a1442932c6c225fe Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Mon, 26 Feb 2024 20:50:49 +1030 Subject: [PATCH 08/18] test test --- .github/workflows/docker-build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-test.yaml b/.github/workflows/docker-build-test.yaml index 5da06f13..56e507cf 100644 --- a/.github/workflows/docker-build-test.yaml +++ b/.github/workflows/docker-build-test.yaml @@ -49,4 +49,4 @@ jobs: tags: emhass/test load: true - name: Test #assume docker fail with missing retrieve_hass_conf - run: docker run -it emhass/test | grep -q retrieve_hass_conf + run: docker run --rm -it emhass/test | grep FileNotFoundError | grep -q secrets_emhass.yaml From f55f3ca18cf2e904a27d66cb4deaad11ddac62c2 Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Mon, 26 Feb 2024 21:13:07 +1030 Subject: [PATCH 09/18] test test --- .github/workflows/docker-build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-test.yaml b/.github/workflows/docker-build-test.yaml index 56e507cf..542d11b2 100644 --- a/.github/workflows/docker-build-test.yaml +++ b/.github/workflows/docker-build-test.yaml @@ -49,4 +49,4 @@ jobs: tags: emhass/test load: true - name: Test #assume docker fail with missing retrieve_hass_conf - run: docker run --rm -it emhass/test | grep FileNotFoundError | grep -q secrets_emhass.yaml + run: docker run --rm emhass/test | grep FileNotFoundError | grep -c secrets_emhass.yaml From a0f15d048704a10a1347d5493860e78570087e1d Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Mon, 26 Feb 2024 21:23:57 +1030 Subject: [PATCH 10/18] test test --- .github/workflows/docker-build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-test.yaml b/.github/workflows/docker-build-test.yaml index 542d11b2..ca15fedf 100644 --- a/.github/workflows/docker-build-test.yaml +++ b/.github/workflows/docker-build-test.yaml @@ -49,4 +49,4 @@ jobs: tags: emhass/test load: true - name: Test #assume docker fail with missing retrieve_hass_conf - run: docker run --rm emhass/test | grep FileNotFoundError | grep -c secrets_emhass.yaml + run: docker run --rm -it emhass/test | grep FileNotFoundError | grep -q secrets_emhass.yaml && echo 0 || echo 1 From 2bed24d9ac495fe2250d379cf1c913e646e0305f Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Mon, 26 Feb 2024 21:42:04 +1030 Subject: [PATCH 11/18] test test --- .github/workflows/docker-build-test.yaml | 2 +- .github/workflows/publish_docker.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build-test.yaml b/.github/workflows/docker-build-test.yaml index ca15fedf..4026669f 100644 --- a/.github/workflows/docker-build-test.yaml +++ b/.github/workflows/docker-build-test.yaml @@ -1,4 +1,4 @@ -#This action test builds EMHASS standalone Docker images, in each artitectire. +#This action test builds EMHASS standalone Docker images, in each architecture. name: "Test Docker Stanadlone" on: diff --git a/.github/workflows/publish_docker.yaml b/.github/workflows/publish_docker.yaml index e4bd267f..013ea1bd 100644 --- a/.github/workflows/publish_docker.yaml +++ b/.github/workflows/publish_docker.yaml @@ -93,4 +93,4 @@ jobs: $(printf 'davidusb/emhass-docker-standalone@sha256:%s ' *) - name: Inspect image run: | - docker buildx imagetools inspect davidusb/emhass-docker-standalone:${{ steps.meta.outputs.version }} \ No newline at end of file + docker buildx imagetools inspect davidusb/emhass-docker-standalone:${{ steps.meta.outputs.version }} \ No newline at end of file From f511236e0f2e7cb68cacb567871722eb836a935a Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Mon, 26 Feb 2024 22:10:19 +1030 Subject: [PATCH 12/18] test test --- .github/workflows/publish_docker.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish_docker.yaml b/.github/workflows/publish_docker.yaml index 013ea1bd..10bd7da0 100644 --- a/.github/workflows/publish_docker.yaml +++ b/.github/workflows/publish_docker.yaml @@ -26,7 +26,7 @@ jobs: uses: docker/metadata-action@v5 with: images: | - davidusb/emhass-docker-standalone + ${{ secrets.DOCKERHUB_USERNAME }}/emhass-docker-standalone tags: | type=semver,pattern={{version}} type=raw,value=latest @@ -50,7 +50,7 @@ jobs: TARGETARCH=${{ matrix.platform.target_arch }} labels: ${{ steps.meta.outputs.labels }} tags: ${{ steps.meta.outputs.tags }} - outputs: type=image,name=davidusb/emhass-docker-standalone,push-by-digest=true,name-canonical=true,push=true + outputs: type=image,name=${{ secrets.DOCKERHUB_USERNAME }}/emhass-docker-standalone,push-by-digest=true,name-canonical=true,push=true - name: Export digest run: | mkdir -p /tmp/digests @@ -80,7 +80,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: davidusb/emhass-docker-standalone + images: ${{ secrets.DOCKERHUB_USERNAME }}/emhass-docker-standalone - name: Login to Docker Hub uses: docker/login-action@v3 with: @@ -90,7 +90,7 @@ jobs: working-directory: /tmp/digests run: | docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(printf 'davidusb/emhass-docker-standalone@sha256:%s ' *) + $(printf '${{ secrets.DOCKERHUB_USERNAME }}/emhass-docker-standalone@sha256:%s ' *) - name: Inspect image run: | - docker buildx imagetools inspect davidusb/emhass-docker-standalone:${{ steps.meta.outputs.version }} \ No newline at end of file + docker buildx imagetools inspect ${{ secrets.DOCKERHUB_USERNAME }}/emhass-docker-standalone:${{ steps.meta.outputs.version }} \ No newline at end of file From dc631f52a03826d4cf194e56dc4eb68438a33c95 Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Mon, 26 Feb 2024 22:13:09 +1030 Subject: [PATCH 13/18] test --- .github/workflows/docker-build-test.yaml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker-build-test.yaml b/.github/workflows/docker-build-test.yaml index 4026669f..356dc1d3 100644 --- a/.github/workflows/docker-build-test.yaml +++ b/.github/workflows/docker-build-test.yaml @@ -23,15 +23,6 @@ jobs: steps: - name: Checkout the repository uses: actions/checkout@v4 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: | - davidusb/emhass-docker-standalone - tags: | - type=semver,pattern={{version}} - type=raw,value=latest - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -45,8 +36,7 @@ jobs: build-args: | build_version=standalone TARGETARCH=${{ matrix.platform.target_arch }} - labels: ${{ steps.meta.outputs.labels }} - tags: emhass/test + tags: emhass/standalone-test load: true - name: Test #assume docker fail with missing retrieve_hass_conf - run: docker run --rm -it emhass/test | grep FileNotFoundError | grep -q secrets_emhass.yaml && echo 0 || echo 1 + run: docker run --rm -it emhass/standalone-test | grep FileNotFoundError | grep -q secrets_emhass.yaml && echo 0 || echo 1 From b6d7dec740b7035c02f1e8600a64d51630d2df29 Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Mon, 26 Feb 2024 22:28:11 +1030 Subject: [PATCH 14/18] test test --- .github/workflows/docker-build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-test.yaml b/.github/workflows/docker-build-test.yaml index 356dc1d3..adc0b355 100644 --- a/.github/workflows/docker-build-test.yaml +++ b/.github/workflows/docker-build-test.yaml @@ -38,5 +38,5 @@ jobs: TARGETARCH=${{ matrix.platform.target_arch }} tags: emhass/standalone-test load: true - - name: Test #assume docker fail with missing retrieve_hass_conf + - name: Test #assume docker fail with FileNotFound secrets_emhass.yaml error run: docker run --rm -it emhass/standalone-test | grep FileNotFoundError | grep -q secrets_emhass.yaml && echo 0 || echo 1 From 77f22bc7843899ee4e76052dd31d4c861901b914 Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Mon, 26 Feb 2024 22:31:21 +1030 Subject: [PATCH 15/18] test test --- .github/workflows/docker-build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-test.yaml b/.github/workflows/docker-build-test.yaml index adc0b355..af5caf22 100644 --- a/.github/workflows/docker-build-test.yaml +++ b/.github/workflows/docker-build-test.yaml @@ -39,4 +39,4 @@ jobs: tags: emhass/standalone-test load: true - name: Test #assume docker fail with FileNotFound secrets_emhass.yaml error - run: docker run --rm -it emhass/standalone-test | grep FileNotFoundError | grep -q secrets_emhass.yaml && echo 0 || echo 1 + run: docker run --rm -it emhass/standalone-test | grep -q secrets_emhass.yaml && echo 0 || echo 1 From b276828fbc9fdd8bc68a0040f4007c2f5bd41e76 Mon Sep 17 00:00:00 2001 From: john whately <18461782+GeoDerp@users.noreply.github.com> Date: Mon, 26 Feb 2024 23:57:28 +1030 Subject: [PATCH 16/18] publish_docker, tweaked tags --- .github/workflows/publish_docker.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish_docker.yaml b/.github/workflows/publish_docker.yaml index 10bd7da0..fbc7ee36 100644 --- a/.github/workflows/publish_docker.yaml +++ b/.github/workflows/publish_docker.yaml @@ -8,7 +8,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-latest strategy: fail-fast: false matrix: @@ -27,9 +27,6 @@ jobs: with: images: | ${{ secrets.DOCKERHUB_USERNAME }}/emhass-docker-standalone - tags: | - type=semver,pattern={{version}} - type=raw,value=latest - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -49,7 +46,6 @@ jobs: build_version=standalone TARGETARCH=${{ matrix.platform.target_arch }} labels: ${{ steps.meta.outputs.labels }} - tags: ${{ steps.meta.outputs.tags }} outputs: type=image,name=${{ secrets.DOCKERHUB_USERNAME }}/emhass-docker-standalone,push-by-digest=true,name-canonical=true,push=true - name: Export digest run: | @@ -81,6 +77,9 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ secrets.DOCKERHUB_USERNAME }}/emhass-docker-standalone + tags: | + type=semver,pattern={{version}} + type=raw,value=latest - name: Login to Docker Hub uses: docker/login-action@v3 with: @@ -93,4 +92,4 @@ jobs: $(printf '${{ secrets.DOCKERHUB_USERNAME }}/emhass-docker-standalone@sha256:%s ' *) - name: Inspect image run: | - docker buildx imagetools inspect ${{ secrets.DOCKERHUB_USERNAME }}/emhass-docker-standalone:${{ steps.meta.outputs.version }} \ No newline at end of file + docker buildx imagetools inspect ${{ secrets.DOCKERHUB_USERNAME }}/emhass-docker-standalone:${{ steps.meta.outputs.version }} From 4ee03325c3bfa3a0350148264f3dbbd461d05b84 Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Tue, 27 Feb 2024 17:47:59 +1030 Subject: [PATCH 17/18] publish action, added if always --- .github/workflows/publish_docker.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish_docker.yaml b/.github/workflows/publish_docker.yaml index fbc7ee36..d744864a 100644 --- a/.github/workflows/publish_docker.yaml +++ b/.github/workflows/publish_docker.yaml @@ -60,6 +60,7 @@ jobs: if-no-files-found: error retention-days: 1 merge: + if: ${{matrix.platform.target_arch(amd64).build == 'failure' }} runs-on: ubuntu-latest needs: - build From 20cc2569a11211bc01c85fdb698848cac655ffbb Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Tue, 27 Feb 2024 17:48:19 +1030 Subject: [PATCH 18/18] publish docker if always --- .github/workflows/publish_docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish_docker.yaml b/.github/workflows/publish_docker.yaml index d744864a..b87099c8 100644 --- a/.github/workflows/publish_docker.yaml +++ b/.github/workflows/publish_docker.yaml @@ -60,7 +60,7 @@ jobs: if-no-files-found: error retention-days: 1 merge: - if: ${{matrix.platform.target_arch(amd64).build == 'failure' }} + if: always() runs-on: ubuntu-latest needs: - build