From c7da4e131dd7a1cc29b7d84fa7d313bf287a9d52 Mon Sep 17 00:00:00 2001 From: buanet Date: Mon, 20 Mar 2023 22:12:17 +0100 Subject: [PATCH 01/25] fix node version --- .github/workflows/build-debian-image-latest-iob.yml | 6 +++--- .github/workflows/build-debian-image-latest.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-debian-image-latest-iob.yml b/.github/workflows/build-debian-image-latest-iob.yml index b4f7b44..f681f2c 100644 --- a/.github/workflows/build-debian-image-latest-iob.yml +++ b/.github/workflows/build-debian-image-latest-iob.yml @@ -38,8 +38,8 @@ jobs: sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$DATI/" ./debian/scripts/iobroker_startup.sh > ./debian/scripts/iobroker_startup.tmp mv -f ./debian/scripts/iobroker_startup.tmp ./debian/scripts/iobroker_startup.sh # amd64 - sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$DATI/" ./debian/node16/Dockerfile > ./debian/node16/Dockerfile.tmp - mv -f ./debian/node16/Dockerfile.tmp ./debian/node16/Dockerfile + sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$DATI/" ./debian/node18/Dockerfile > ./debian/node18/Dockerfile.tmp + mv -f ./debian/node18/Dockerfile.tmp ./debian/node18/Dockerfile - name: Set up QEMU uses: docker/setup-qemu-action@v2.1.0 @@ -58,7 +58,7 @@ jobs: uses: docker/build-push-action@v4.0.0 with: context: ./debian - file: ./debian/node16/Dockerfile + file: ./debian/node18/Dockerfile push: true platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 tags: | diff --git a/.github/workflows/build-debian-image-latest.yml b/.github/workflows/build-debian-image-latest.yml index a1177c3..6fb8edf 100644 --- a/.github/workflows/build-debian-image-latest.yml +++ b/.github/workflows/build-debian-image-latest.yml @@ -38,8 +38,8 @@ jobs: sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$DATI/" ./debian/scripts/iobroker_startup.sh > ./debian/scripts/iobroker_startup.tmp mv -f ./debian/scripts/iobroker_startup.tmp ./debian/scripts/iobroker_startup.sh # amd64 - sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$DATI/" ./debian/node16/Dockerfile > ./debian/node16/Dockerfile.tmp - mv -f ./debian/node16/Dockerfile.tmp ./debian/node16/Dockerfile + sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$DATI/" ./debian/node18/Dockerfile > ./debian/node18/Dockerfile.tmp + mv -f ./debian/node18/Dockerfile.tmp ./debian/node18/Dockerfile - name: Set up QEMU uses: docker/setup-qemu-action@v2.1.0 @@ -65,7 +65,7 @@ jobs: uses: docker/build-push-action@v4.0.0 with: context: ./debian - file: ./debian/node16/Dockerfile + file: ./debian/node18/Dockerfile push: true platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 tags: | From 8ee1753ea0bc1b9a02bf073a262094e41c4f88a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Germann?= Date: Thu, 6 Apr 2023 19:23:42 +0200 Subject: [PATCH 02/25] Update build-debian-image-latest.yml fix buildx issue with manifests on ghcr.io --- .github/workflows/build-debian-image-latest.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-debian-image-latest.yml b/.github/workflows/build-debian-image-latest.yml index 6fb8edf..53f23a8 100644 --- a/.github/workflows/build-debian-image-latest.yml +++ b/.github/workflows/build-debian-image-latest.yml @@ -47,6 +47,8 @@ jobs: - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v2.4.1 + with: + version: v0.10.3 # pin buildx version because of issue with ghcr.io (https://github.com/docker/build-push-action/issues/851) - name: Login to DockerHub (buanet) uses: docker/login-action@v2.1.0 From 04805e9ce1411c6cd5bc9bd23d1cd120cac7f151 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Apr 2023 17:45:51 +0000 Subject: [PATCH 03/25] Bump docker/setup-buildx-action from 2.4.1 to 2.5.0 Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.4.1 to 2.5.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v2.4.1...v2.5.0) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/build-debian-image-beta-node20.yml | 2 +- .github/workflows/build-debian-image-beta.yml | 2 +- .github/workflows/build-debian-image-dev-node20.yml | 2 +- .github/workflows/build-debian-image-dev.yml | 2 +- .github/workflows/build-debian-image-latest-iob.yml | 2 +- .github/workflows/build-debian-image-latest.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-debian-image-beta-node20.yml b/.github/workflows/build-debian-image-beta-node20.yml index 8a4427e..b2368d4 100644 --- a/.github/workflows/build-debian-image-beta-node20.yml +++ b/.github/workflows/build-debian-image-beta-node20.yml @@ -43,7 +43,7 @@ jobs: - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2.4.1 + uses: docker/setup-buildx-action@v2.5.0 - name: Login to DockerHub uses: docker/login-action@v2.1.0 diff --git a/.github/workflows/build-debian-image-beta.yml b/.github/workflows/build-debian-image-beta.yml index bd88537..463cc4a 100644 --- a/.github/workflows/build-debian-image-beta.yml +++ b/.github/workflows/build-debian-image-beta.yml @@ -43,7 +43,7 @@ jobs: - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2.4.1 + uses: docker/setup-buildx-action@v2.5.0 - name: Login to DockerHub uses: docker/login-action@v2.1.0 diff --git a/.github/workflows/build-debian-image-dev-node20.yml b/.github/workflows/build-debian-image-dev-node20.yml index 55919dd..73dea66 100644 --- a/.github/workflows/build-debian-image-dev-node20.yml +++ b/.github/workflows/build-debian-image-dev-node20.yml @@ -37,7 +37,7 @@ jobs: - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2.4.1 + uses: docker/setup-buildx-action@v2.5.0 - name: Login to DockerHub uses: docker/login-action@v2.1.0 diff --git a/.github/workflows/build-debian-image-dev.yml b/.github/workflows/build-debian-image-dev.yml index 07553fb..a0aca65 100644 --- a/.github/workflows/build-debian-image-dev.yml +++ b/.github/workflows/build-debian-image-dev.yml @@ -37,7 +37,7 @@ jobs: - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2.4.1 + uses: docker/setup-buildx-action@v2.5.0 - name: Login to DockerHub uses: docker/login-action@v2.1.0 diff --git a/.github/workflows/build-debian-image-latest-iob.yml b/.github/workflows/build-debian-image-latest-iob.yml index f681f2c..92b270d 100644 --- a/.github/workflows/build-debian-image-latest-iob.yml +++ b/.github/workflows/build-debian-image-latest-iob.yml @@ -46,7 +46,7 @@ jobs: - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2.4.1 + uses: docker/setup-buildx-action@v2.5.0 - name: Login to DockerHub (iobroker) uses: docker/login-action@v2.1.0 diff --git a/.github/workflows/build-debian-image-latest.yml b/.github/workflows/build-debian-image-latest.yml index 53f23a8..139a305 100644 --- a/.github/workflows/build-debian-image-latest.yml +++ b/.github/workflows/build-debian-image-latest.yml @@ -46,7 +46,7 @@ jobs: - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2.4.1 + uses: docker/setup-buildx-action@v2.5.0 with: version: v0.10.3 # pin buildx version because of issue with ghcr.io (https://github.com/docker/build-push-action/issues/851) From 5419ae2bf145ae9786061c1fe7539e2ced510e5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Germann?= Date: Thu, 6 Apr 2023 20:07:45 +0200 Subject: [PATCH 04/25] Update build-debian-image-latest.yml --- .github/workflows/build-debian-image-latest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-debian-image-latest.yml b/.github/workflows/build-debian-image-latest.yml index 139a305..183051f 100644 --- a/.github/workflows/build-debian-image-latest.yml +++ b/.github/workflows/build-debian-image-latest.yml @@ -47,8 +47,8 @@ jobs: - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v2.5.0 - with: - version: v0.10.3 # pin buildx version because of issue with ghcr.io (https://github.com/docker/build-push-action/issues/851) +# with: +# version: v0.10.3 # pin buildx version because of issue with ghcr.io (https://github.com/docker/build-push-action/issues/851) - name: Login to DockerHub (buanet) uses: docker/login-action@v2.1.0 From d160acfd1a3fa06f268cf5514cf225bee517ebc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Germann?= Date: Fri, 7 Apr 2023 00:23:09 +0200 Subject: [PATCH 05/25] Update build-debian-image-latest.yml --- .github/workflows/build-debian-image-latest.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-debian-image-latest.yml b/.github/workflows/build-debian-image-latest.yml index 183051f..f67102c 100644 --- a/.github/workflows/build-debian-image-latest.yml +++ b/.github/workflows/build-debian-image-latest.yml @@ -46,7 +46,7 @@ jobs: - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2.5.0 + uses: docker/setup-buildx-action@v2.4.1 # with: # version: v0.10.3 # pin buildx version because of issue with ghcr.io (https://github.com/docker/build-push-action/issues/851) @@ -68,6 +68,7 @@ jobs: with: context: ./debian file: ./debian/node18/Dockerfile + provenance: false push: true platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 tags: | From 619de2abc20704e2ddf34101c190ffdc95cf1d44 Mon Sep 17 00:00:00 2001 From: buanet Date: Fri, 7 Apr 2023 22:05:47 +0200 Subject: [PATCH 06/25] testing --- .github/workflows/build-debian-image-latest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-debian-image-latest.yml b/.github/workflows/build-debian-image-latest.yml index f67102c..22b291a 100644 --- a/.github/workflows/build-debian-image-latest.yml +++ b/.github/workflows/build-debian-image-latest.yml @@ -46,7 +46,7 @@ jobs: - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2.4.1 + uses: docker/setup-buildx-action@v2.5.0 #v2.4.1 # with: # version: v0.10.3 # pin buildx version because of issue with ghcr.io (https://github.com/docker/build-push-action/issues/851) From 454287d078bf3c943b5958be665a99261d0a7072 Mon Sep 17 00:00:00 2001 From: buanet Date: Fri, 7 Apr 2023 23:45:06 +0000 Subject: [PATCH 07/25] new ioBroker versions --- .github/dependencies/.backitup-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependencies/.backitup-version b/.github/dependencies/.backitup-version index dfe30ee..58654fe 100644 --- a/.github/dependencies/.backitup-version +++ b/.github/dependencies/.backitup-version @@ -1 +1 @@ -2.5.12 +2.6.16 From be18293a5bbd2f1e0fa5c7d92a1258f57a5fd21b Mon Sep 17 00:00:00 2001 From: buanet Date: Tue, 11 Apr 2023 18:37:45 +0200 Subject: [PATCH 08/25] small enhancements --- .VERSION | 2 +- .../workflows/build-debian-image-latest.yml | 7 ++----- CHANGELOG.md | 5 +++++ debian/scripts/iobroker_startup.sh | 18 ++++++++++++++---- debian/scripts/maintenance.sh | 9 +++++++++ debian/scripts/setup_iob_db.sh | 16 ++++++++++++++-- 6 files changed, 45 insertions(+), 12 deletions(-) diff --git a/.VERSION b/.VERSION index e4842dc..6743486 100644 --- a/.VERSION +++ b/.VERSION @@ -1 +1 @@ -v8.0.0 \ No newline at end of file +v8.1.0-beta.1 \ No newline at end of file diff --git a/.github/workflows/build-debian-image-latest.yml b/.github/workflows/build-debian-image-latest.yml index 22b291a..4b327b4 100644 --- a/.github/workflows/build-debian-image-latest.yml +++ b/.github/workflows/build-debian-image-latest.yml @@ -46,10 +46,7 @@ jobs: - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2.5.0 #v2.4.1 -# with: -# version: v0.10.3 # pin buildx version because of issue with ghcr.io (https://github.com/docker/build-push-action/issues/851) - + uses: docker/setup-buildx-action@v2.5.0 - name: Login to DockerHub (buanet) uses: docker/login-action@v2.1.0 with: @@ -68,7 +65,7 @@ jobs: with: context: ./debian file: ./debian/node18/Dockerfile - provenance: false + #provenance: false push: true platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 tags: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 0667261..8d4e7a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## Changelog +### v8.1.0-beta.1 (coming soon) +* enhance log output of maintenance script on restore ([#333](https://github.com/buanet/ioBroker.docker/issues/333)) +* allow iobroker admin to be disabled at startup ([#332](https://github.com/buanet/ioBroker.docker/issues/332)) +* allow deletion of objects and states db password with value "none" ([#306](https://github.com/buanet/ioBroker.docker/issues/306)) + ### v8.0.0 (20.03.2023) * update readme and docs * remove manifests diff --git a/debian/scripts/iobroker_startup.sh b/debian/scripts/iobroker_startup.sh index f3b139e..3977436 100644 --- a/debian/scripts/iobroker_startup.sh +++ b/debian/scripts/iobroker_startup.sh @@ -352,10 +352,20 @@ else adminhostname=$(bash iobroker object get "$admininstance" --pretty | grep -oP '(?<="host": ")[^"]*') if [[ "$debug" == "true" ]]; then echo "[DEBUG] Detected admin hostname is:" "$adminhostname"; fi else - echo "There was a problem detecting the admin instance of your iobroker." - echo "Make sure the ioBroker installation you use has an admin instance or try again with a fresh installation and restore your configuration." - echo "For more details see https://docs.buanet.de/iobroker-docker-image/docs/#restore" - stop_on_error + set +e + admininstance=$(bash iobroker list instances | grep 'disabled' | grep -m 1 -o 'system.adapter.admin..') + set -e + if [[ "$admininstance" != "" ]]; then + if [[ "$debug" == "true" ]]; then echo "[DEBUG] Detected admin instance is disabled."; fi + if [[ "$debug" == "true" ]]; then echo "[DEBUG] Detected admin instance is:" "$admininstance"; fi + adminhostname=$(bash iobroker object get "$admininstance" --pretty | grep -oP '(?<="host": ")[^"]*') + if [[ "$debug" == "true" ]]; then echo "[DEBUG] Detected admin hostname is:" "$adminhostname"; fi + else + echo "There was a problem detecting the admin instance of your iobroker." + echo "Make sure the ioBroker installation you use has an admin instance or try again with a fresh installation and restore your configuration." + echo "For more details see https://docs.buanet.de/iobroker-docker-image/docs/#restore" + stop_on_error + fi fi # check hostname if [[ "$adminhostname" != "" && "$adminhostname" != "$(hostname)" ]]; then diff --git a/debian/scripts/maintenance.sh b/debian/scripts/maintenance.sh index 95222ab..13f133d 100644 --- a/debian/scripts/maintenance.sh +++ b/debian/scripts/maintenance.sh @@ -242,7 +242,16 @@ restore_iobroker() { #chown -R $setuid:$setgid /opt/iobroker/backup echo -n "Restoring ioBroker... " + set +e bash iobroker restore 0 > /opt/iobroker/log/restore.log 2>&1 + return=$? + set -e + if [[ "$return" -ne 0 ]]; then + echo "Failed." + echo "For more details see \"/opt/iobroker/log/restore.log\"." + echo "Please check backup file location and permissions and try again." + return 1 + fi echo 'Done.' echo ' ' echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" diff --git a/debian/scripts/setup_iob_db.sh b/debian/scripts/setup_iob_db.sh index 665766e..44164b9 100644 --- a/debian/scripts/setup_iob_db.sh +++ b/debian/scripts/setup_iob_db.sh @@ -99,7 +99,13 @@ set_objectsdb_port() { fi } set_objectsdb_pass() { - if [[ "$objectsdbpass" != "$(jq -r '.objects.options.auth_pass' /opt/iobroker/iobroker-data/iobroker.json)" ]]; then + if [[ "$objectsdbpass" == "none" ]]; then + echo "IOB_OBJECTSDB_PASS is available but value is set to \"none\"." + echo -n "Removing password of objects db... " + jq '.objects.options.auth_pass = null' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp + write_iobroker_json + echo 'Done.' + elif [[ "$objectsdbpass" != "$(jq -r '.objects.options.auth_pass' /opt/iobroker/iobroker-data/iobroker.json)" ]]; then echo "IOB_OBJECTSDB_PASS is available but value is different from detected ioBroker installation." echo -n "Setting password of objects db... " jq --arg value "$objectsdbpass" '.objects.options.auth_pass = $value' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp @@ -188,7 +194,13 @@ set_statesdb_port() { fi } set_statesdb_pass() { - if [[ "$statesdbpass" != "$(jq -r '.states.options.auth_pass' /opt/iobroker/iobroker-data/iobroker.json)" ]]; then + if [[ "$statesdbpass" == "none" ]]; then + echo "IOB_STATESDB_PASS is available but value is set to \"none\"." + echo -n "Removing password of states db... " + jq '.states.options.auth_pass = null' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp + write_iobroker_json + echo 'Done.' + elif [[ "$statesdbpass" != "$(jq -r '.states.options.auth_pass' /opt/iobroker/iobroker-data/iobroker.json)" ]]; then echo "IOB_STATESDB_PASS is available but value is different from detected ioBroker installation." echo -n "Setting password of states db... " jq --arg value "$statesdbpass" '.states.options.auth_pass = $value' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp From 61d655b9e6a9d4c971e926eab87c109c52973cca Mon Sep 17 00:00:00 2001 From: buanet Date: Tue, 11 Apr 2023 19:33:51 +0200 Subject: [PATCH 09/25] test gha --- .github/workflows/build-debian-image-dev.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-debian-image-dev.yml b/.github/workflows/build-debian-image-dev.yml index a0aca65..44d8295 100644 --- a/.github/workflows/build-debian-image-dev.yml +++ b/.github/workflows/build-debian-image-dev.yml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.PACKAGES_PASS }} - name: Build Docker image - uses: docker/build-push-action@v4.0.0 + uses: docker/build-push-action@v3 with: context: ./debian file: ./debian/node18/Dockerfile @@ -62,6 +62,7 @@ jobs: tags: | buanet/iobroker:dev, ghcr.io/buanet/iobroker:dev + provenance: false - name: Delete untagged images from GitHub packages uses: actions/github-script@v6 From 6ddb84333f890595d5a095ff732019e1e52adf69 Mon Sep 17 00:00:00 2001 From: buanet Date: Tue, 11 Apr 2023 21:24:05 +0200 Subject: [PATCH 10/25] testing --- .github/workflows/build-debian-image-dev.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-debian-image-dev.yml b/.github/workflows/build-debian-image-dev.yml index 44d8295..d2d2856 100644 --- a/.github/workflows/build-debian-image-dev.yml +++ b/.github/workflows/build-debian-image-dev.yml @@ -37,7 +37,7 @@ jobs: - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2.5.0 + uses: docker/setup-buildx-action@v2.4.1 - name: Login to DockerHub uses: docker/login-action@v2.1.0 @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.PACKAGES_PASS }} - name: Build Docker image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: ./debian file: ./debian/node18/Dockerfile @@ -62,7 +62,7 @@ jobs: tags: | buanet/iobroker:dev, ghcr.io/buanet/iobroker:dev - provenance: false + #provenance: false - name: Delete untagged images from GitHub packages uses: actions/github-script@v6 From 3e2589fae9c4901b237545d34088e191970e0599 Mon Sep 17 00:00:00 2001 From: buanet Date: Tue, 11 Apr 2023 21:38:33 +0200 Subject: [PATCH 11/25] testing --- .github/workflows/build-debian-image-dev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-debian-image-dev.yml b/.github/workflows/build-debian-image-dev.yml index d2d2856..a79f4d7 100644 --- a/.github/workflows/build-debian-image-dev.yml +++ b/.github/workflows/build-debian-image-dev.yml @@ -37,7 +37,7 @@ jobs: - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2.4.1 + uses: docker/setup-buildx-action@v2.2.1 - name: Login to DockerHub uses: docker/login-action@v2.1.0 @@ -62,7 +62,7 @@ jobs: tags: | buanet/iobroker:dev, ghcr.io/buanet/iobroker:dev - #provenance: false + provenance: false - name: Delete untagged images from GitHub packages uses: actions/github-script@v6 From d907c34d6ace4f70a25e680e4e71fe012cd624ec Mon Sep 17 00:00:00 2001 From: buanet Date: Tue, 11 Apr 2023 22:57:10 +0200 Subject: [PATCH 12/25] more testing --- .github/workflows/build-debian-image-dev.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-debian-image-dev.yml b/.github/workflows/build-debian-image-dev.yml index a79f4d7..e5ba310 100644 --- a/.github/workflows/build-debian-image-dev.yml +++ b/.github/workflows/build-debian-image-dev.yml @@ -9,11 +9,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v3.5.0 with: repository: 'buanet/ioBroker.docker' - - name: Fetching version tag and date + - name: Fetch version tag and date id: version run: | VERSION="$(cat .VERSION)" @@ -37,7 +37,7 @@ jobs: - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2.2.1 + uses: docker/setup-buildx-action@v2.5.0 - name: Login to DockerHub uses: docker/login-action@v2.1.0 @@ -52,8 +52,8 @@ jobs: username: ${{ secrets.PACKAGES_USER }} password: ${{ secrets.PACKAGES_PASS }} - - name: Build Docker image - uses: docker/build-push-action@v4 + - name: Build and push Docker image + uses: docker/build-push-action@v4.0.0 with: context: ./debian file: ./debian/node18/Dockerfile @@ -64,8 +64,8 @@ jobs: ghcr.io/buanet/iobroker:dev provenance: false - - name: Delete untagged images from GitHub packages - uses: actions/github-script@v6 + - name: Delete untagged images from GitHub Container Registry + uses: actions/github-script@v6.4.1 with: github-token: ${{ secrets.PACKAGES_PASS }} script: | From d1ef72659461db1b1222ad4d5e210d3c9b50f537 Mon Sep 17 00:00:00 2001 From: buanet Date: Tue, 11 Apr 2023 23:45:24 +0200 Subject: [PATCH 13/25] testing with metadata --- .github/workflows/build-debian-image-dev.yml | 21 ++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-debian-image-dev.yml b/.github/workflows/build-debian-image-dev.yml index e5ba310..90a7818 100644 --- a/.github/workflows/build-debian-image-dev.yml +++ b/.github/workflows/build-debian-image-dev.yml @@ -52,6 +52,16 @@ jobs: username: ${{ secrets.PACKAGES_USER }} password: ${{ secrets.PACKAGES_PASS }} + - name: Extract metadata (tags, labels) + id: metadata + uses: docker/metadata-action@v4.3.0 + with: + images: | + buanet/iobroker + ghcr.io/buanet/iobroker + tags: | + type=raw,value=dev + - name: Build and push Docker image uses: docker/build-push-action@v4.0.0 with: @@ -59,10 +69,13 @@ jobs: file: ./debian/node18/Dockerfile push: true platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 - tags: | - buanet/iobroker:dev, - ghcr.io/buanet/iobroker:dev - provenance: false + tags: ${{ steps.metadata.outputs.tags }} + labels: ${{ steps.metadata.outputs.labels }} + # tags: | + # buanet/iobroker:dev, + # ghcr.io/buanet/iobroker:dev + #provenance: false + #outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Officical Docker image for ioBroker smarthome software (https://www.iobroker.net) - name: Delete untagged images from GitHub Container Registry uses: actions/github-script@v6.4.1 From 1b1249eb4686cd9bbb98598457ec295360536c28 Mon Sep 17 00:00:00 2001 From: buanet Date: Wed, 12 Apr 2023 01:00:30 +0200 Subject: [PATCH 14/25] some more testing --- .github/workflows/build-debian-image-dev.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-debian-image-dev.yml b/.github/workflows/build-debian-image-dev.yml index 90a7818..a754abb 100644 --- a/.github/workflows/build-debian-image-dev.yml +++ b/.github/workflows/build-debian-image-dev.yml @@ -61,6 +61,16 @@ jobs: ghcr.io/buanet/iobroker tags: | type=raw,value=dev + labels: | + org.opencontainers.image.title=Official ioBroker Docker Image + org.opencontainers.image.description=Officical Docker image for ioBroker smarthome software (https://www.iobroker.net) + org.opencontainers.image.documentation=https://github.com/buanet/ioBroker.docker#readme + org.opencontainers.image.authors=André Germann + org.opencontainers.image.url=https://github.com/buanet/ioBroker.docker + org.opencontainers.image.source=https://github.com/buanet/ioBroker.docker + org.opencontainers.image.base.name=docker.io/library/debian:bullseye-slim + org.opencontainers.image.version=${{ env.VERSION }} + org.opencontainers.image.created=${{ env.DATI }} - name: Build and push Docker image uses: docker/build-push-action@v4.0.0 @@ -74,8 +84,8 @@ jobs: # tags: | # buanet/iobroker:dev, # ghcr.io/buanet/iobroker:dev - #provenance: false - #outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Officical Docker image for ioBroker smarthome software (https://www.iobroker.net) + provenance: false + outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Officical Docker image for ioBroker smarthome software (https://www.iobroker.net) - name: Delete untagged images from GitHub Container Registry uses: actions/github-script@v6.4.1 From e332bc0e41f46bba0392b441c9285b1409e83bf3 Mon Sep 17 00:00:00 2001 From: buanet Date: Wed, 12 Apr 2023 09:12:53 +0200 Subject: [PATCH 15/25] testing with specific arch tags --- .github/workflows/build-debian-image-dev.yml | 54 +++++++++++--------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-debian-image-dev.yml b/.github/workflows/build-debian-image-dev.yml index a754abb..34d8049 100644 --- a/.github/workflows/build-debian-image-dev.yml +++ b/.github/workflows/build-debian-image-dev.yml @@ -52,25 +52,25 @@ jobs: username: ${{ secrets.PACKAGES_USER }} password: ${{ secrets.PACKAGES_PASS }} - - name: Extract metadata (tags, labels) - id: metadata - uses: docker/metadata-action@v4.3.0 - with: - images: | - buanet/iobroker - ghcr.io/buanet/iobroker - tags: | - type=raw,value=dev - labels: | - org.opencontainers.image.title=Official ioBroker Docker Image - org.opencontainers.image.description=Officical Docker image for ioBroker smarthome software (https://www.iobroker.net) - org.opencontainers.image.documentation=https://github.com/buanet/ioBroker.docker#readme - org.opencontainers.image.authors=André Germann - org.opencontainers.image.url=https://github.com/buanet/ioBroker.docker - org.opencontainers.image.source=https://github.com/buanet/ioBroker.docker - org.opencontainers.image.base.name=docker.io/library/debian:bullseye-slim - org.opencontainers.image.version=${{ env.VERSION }} - org.opencontainers.image.created=${{ env.DATI }} +# - name: Extract metadata (tags, labels) +# id: metadata +# uses: docker/metadata-action@v4.3.0 +# with: +# images: | +# buanet/iobroker +# ghcr.io/buanet/iobroker +# tags: | +# type=raw,value=dev +# labels: | +# org.opencontainers.image.title=Official ioBroker Docker Image +# org.opencontainers.image.description=Officical Docker image for ioBroker smarthome software (https://www.iobroker.net) +# org.opencontainers.image.documentation=https://github.com/buanet/ioBroker.docker#readme +# org.opencontainers.image.authors=André Germann +# org.opencontainers.image.url=https://github.com/buanet/ioBroker.docker +# org.opencontainers.image.source=https://github.com/buanet/ioBroker.docker +# org.opencontainers.image.base.name=docker.io/library/debian:bullseye-slim +# org.opencontainers.image.version=${{ env.VERSION }} +# org.opencontainers.image.created=${{ env.DATI }} - name: Build and push Docker image uses: docker/build-push-action@v4.0.0 @@ -79,11 +79,17 @@ jobs: file: ./debian/node18/Dockerfile push: true platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 - tags: ${{ steps.metadata.outputs.tags }} - labels: ${{ steps.metadata.outputs.labels }} - # tags: | - # buanet/iobroker:dev, - # ghcr.io/buanet/iobroker:dev + # tags: ${{ steps.metadata.outputs.tags }} + # labels: ${{ steps.metadata.outputs.labels }} + tags: | + buanet/iobroker:dev, + buanet/iobroker:dev-amd64, + buanet/iobroker:dev-armv7, + buanet/iobroker:dev-arm64v8, + ghcr.io/buanet/iobroker:dev, + ghcr.io/buanet/iobroker:dev-amd64, + ghcr.io/buanet/iobroker:dev-armv7, + ghcr.io/buanet/iobroker:dev-arm64v8 provenance: false outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Officical Docker image for ioBroker smarthome software (https://www.iobroker.net) From 954557f28c325bde43f499c924be3bcddc7d844a Mon Sep 17 00:00:00 2001 From: buanet Date: Wed, 12 Apr 2023 10:40:54 +0200 Subject: [PATCH 16/25] test with docker inspect and build cache --- .github/workflows/build-debian-image-dev.yml | 67 ++++++++++---------- debian/node18/Dockerfile | 2 +- 2 files changed, 36 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build-debian-image-dev.yml b/.github/workflows/build-debian-image-dev.yml index 34d8049..d19afb6 100644 --- a/.github/workflows/build-debian-image-dev.yml +++ b/.github/workflows/build-debian-image-dev.yml @@ -52,25 +52,25 @@ jobs: username: ${{ secrets.PACKAGES_USER }} password: ${{ secrets.PACKAGES_PASS }} -# - name: Extract metadata (tags, labels) -# id: metadata -# uses: docker/metadata-action@v4.3.0 -# with: -# images: | -# buanet/iobroker -# ghcr.io/buanet/iobroker -# tags: | -# type=raw,value=dev -# labels: | -# org.opencontainers.image.title=Official ioBroker Docker Image -# org.opencontainers.image.description=Officical Docker image for ioBroker smarthome software (https://www.iobroker.net) -# org.opencontainers.image.documentation=https://github.com/buanet/ioBroker.docker#readme -# org.opencontainers.image.authors=André Germann -# org.opencontainers.image.url=https://github.com/buanet/ioBroker.docker -# org.opencontainers.image.source=https://github.com/buanet/ioBroker.docker -# org.opencontainers.image.base.name=docker.io/library/debian:bullseye-slim -# org.opencontainers.image.version=${{ env.VERSION }} -# org.opencontainers.image.created=${{ env.DATI }} + - name: Extract metadata (tags, labels) + id: metadata + uses: docker/metadata-action@v4.3.0 + with: + images: | + buanet/iobroker + ghcr.io/buanet/iobroker + tags: | + type=raw,value=dev + labels: | + org.opencontainers.image.title=Official ioBroker Docker Image + org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net) + org.opencontainers.image.documentation=https://github.com/buanet/ioBroker.docker#readme + org.opencontainers.image.authors=André Germann + org.opencontainers.image.url=https://github.com/buanet/ioBroker.docker + org.opencontainers.image.source=https://github.com/buanet/ioBroker.docker + org.opencontainers.image.base.name=docker.io/library/debian:bullseye-slim + org.opencontainers.image.version=${{ env.VERSION }} + org.opencontainers.image.created=${{ env.DATI }} - name: Build and push Docker image uses: docker/build-push-action@v4.0.0 @@ -78,20 +78,23 @@ jobs: context: ./debian file: ./debian/node18/Dockerfile push: true - platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 - # tags: ${{ steps.metadata.outputs.tags }} - # labels: ${{ steps.metadata.outputs.labels }} - tags: | - buanet/iobroker:dev, - buanet/iobroker:dev-amd64, - buanet/iobroker:dev-armv7, - buanet/iobroker:dev-arm64v8, - ghcr.io/buanet/iobroker:dev, - ghcr.io/buanet/iobroker:dev-amd64, - ghcr.io/buanet/iobroker:dev-armv7, - ghcr.io/buanet/iobroker:dev-arm64v8 + platforms: | + linux/amd64 + linux/arm/v7 + linux/arm64/v8 + tags: ${{ steps.metadata.outputs.tags }} + labels: ${{ steps.metadata.outputs.labels }} +# tags: | +# buanet/iobroker:dev, +# ghcr.io/buanet/iobroker:dev provenance: false - outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Officical Docker image for ioBroker smarthome software (https://www.iobroker.net) + outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net) + cache-from: type=gha + cache-to: type=gha,mode=max + + - name: Inspect + run: | + docker image inspect buanet/iobroker:dev - name: Delete untagged images from GitHub Container Registry uses: actions/github-script@v6.4.1 diff --git a/debian/node18/Dockerfile b/debian/node18/Dockerfile index 3383714..3435eac 100644 --- a/debian/node18/Dockerfile +++ b/debian/node18/Dockerfile @@ -1,7 +1,7 @@ FROM debian:bullseye-slim LABEL org.opencontainers.image.title="Official ioBroker Docker Image" \ - org.opencontainers.image.description="Officical Docker image for ioBroker smarthome software (https://www.iobroker.net)" \ + org.opencontainers.image.description="Official Docker image for ioBroker smarthome software (https://www.iobroker.net)" \ org.opencontainers.image.documentation="https://github.com/buanet/ioBroker.docker#readme" \ org.opencontainers.image.authors="André Germann " \ org.opencontainers.image.url="https://github.com/buanet/ioBroker.docker" \ From 96d97f5b35016c7244cf55df4d94e15ef0b93619 Mon Sep 17 00:00:00 2001 From: buanet Date: Wed, 12 Apr 2023 12:33:14 +0200 Subject: [PATCH 17/25] test manual build --- .github/workflows/build-debian-image-dev.yml | 96 +++++++++++--------- 1 file changed, 55 insertions(+), 41 deletions(-) diff --git a/.github/workflows/build-debian-image-dev.yml b/.github/workflows/build-debian-image-dev.yml index d19afb6..9af0acd 100644 --- a/.github/workflows/build-debian-image-dev.yml +++ b/.github/workflows/build-debian-image-dev.yml @@ -52,49 +52,63 @@ jobs: username: ${{ secrets.PACKAGES_USER }} password: ${{ secrets.PACKAGES_PASS }} - - name: Extract metadata (tags, labels) - id: metadata - uses: docker/metadata-action@v4.3.0 - with: - images: | - buanet/iobroker - ghcr.io/buanet/iobroker - tags: | - type=raw,value=dev - labels: | - org.opencontainers.image.title=Official ioBroker Docker Image - org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net) - org.opencontainers.image.documentation=https://github.com/buanet/ioBroker.docker#readme - org.opencontainers.image.authors=André Germann - org.opencontainers.image.url=https://github.com/buanet/ioBroker.docker - org.opencontainers.image.source=https://github.com/buanet/ioBroker.docker - org.opencontainers.image.base.name=docker.io/library/debian:bullseye-slim - org.opencontainers.image.version=${{ env.VERSION }} - org.opencontainers.image.created=${{ env.DATI }} - - name: Build and push Docker image - uses: docker/build-push-action@v4.0.0 - with: - context: ./debian - file: ./debian/node18/Dockerfile - push: true - platforms: | - linux/amd64 - linux/arm/v7 - linux/arm64/v8 - tags: ${{ steps.metadata.outputs.tags }} - labels: ${{ steps.metadata.outputs.labels }} -# tags: | -# buanet/iobroker:dev, -# ghcr.io/buanet/iobroker:dev - provenance: false - outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net) - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Inspect + env: + DOCKER_BUILDKIT: 1 run: | - docker image inspect buanet/iobroker:dev + # Build the Docker image for all platforms + docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7 -t ghcr.io/buanet/iobroker:dev . + + # Create the Docker manifest for the image + docker manifest create ghcr.io/buanet/iobroker:dev ghcr.io/buanet/iobroker:dev-amd64 ghcr.io/buanet/iobroker:dev-arm64 ghcr.io/buanet/iobroker:dev-armv7 + + # Annotate the manifest with the architecture details + docker manifest annotate ghcr.io/buanet/iobroker:dev ghcr.io/buanet/iobroker:dev-amd64 --os linux --arch amd64 + docker manifest annotate ghcr.io/buanet/iobroker:dev ghcr.io/buanet/iobroker:dev-arm64 --os linux --arch arm64 + docker manifest annotate ghcr.io/buanet/iobroker:dev ghcr.io/buanet/iobroker:dev-armv7 --os linux --arch arm --variant v7 + + # Push the Docker manifest to the registry + docker manifest push ghcr.io/buanet/iobroker:dev + +# - name: Extract metadata (tags, labels) +# id: metadata +# uses: docker/metadata-action@v4.3.0 +# with: +# images: | +# buanet/iobroker +# ghcr.io/buanet/iobroker +# tags: | +# type=raw,value=dev +# labels: | +# org.opencontainers.image.title=Official ioBroker Docker Image +# org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net) +# org.opencontainers.image.documentation=https://github.com/buanet/ioBroker.docker#readme +# org.opencontainers.image.authors=André Germann +# org.opencontainers.image.url=https://github.com/buanet/ioBroker.docker +# org.opencontainers.image.source=https://github.com/buanet/ioBroker.docker +# org.opencontainers.image.base.name=docker.io/library/debian:bullseye-slim +# org.opencontainers.image.version=${{ env.VERSION }} +# org.opencontainers.image.created=${{ env.DATI }} + +# - name: Build and push Docker image +# uses: docker/build-push-action@v4.0.0 +# with: +# context: ./debian +# file: ./debian/node18/Dockerfile +# push: true +# platforms: | +# linux/amd64 +# linux/arm/v7 +# linux/arm64/v8 +# tags: ${{ steps.metadata.outputs.tags }} +# labels: ${{ steps.metadata.outputs.labels }} +## tags: | +## buanet/iobroker:dev, +## ghcr.io/buanet/iobroker:dev +# provenance: false +# outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net) +# cache-from: type=gha +# cache-to: type=gha,mode=max - name: Delete untagged images from GitHub Container Registry uses: actions/github-script@v6.4.1 From f56a523e55f000e788894a3204fe4efa735b175b Mon Sep 17 00:00:00 2001 From: buanet Date: Wed, 12 Apr 2023 12:38:06 +0200 Subject: [PATCH 18/25] add build context --- .github/workflows/build-debian-image-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-debian-image-dev.yml b/.github/workflows/build-debian-image-dev.yml index 9af0acd..30a82fc 100644 --- a/.github/workflows/build-debian-image-dev.yml +++ b/.github/workflows/build-debian-image-dev.yml @@ -57,7 +57,7 @@ jobs: DOCKER_BUILDKIT: 1 run: | # Build the Docker image for all platforms - docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7 -t ghcr.io/buanet/iobroker:dev . + docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7 -t ghcr.io/buanet/iobroker:dev -f ./debian/node18/Dockerfile ./debian # Create the Docker manifest for the image docker manifest create ghcr.io/buanet/iobroker:dev ghcr.io/buanet/iobroker:dev-amd64 ghcr.io/buanet/iobroker:dev-arm64 ghcr.io/buanet/iobroker:dev-armv7 From 9e8f8bfd1e11c05eb6ef49227fdc616d129724b7 Mon Sep 17 00:00:00 2001 From: buanet Date: Wed, 12 Apr 2023 13:50:04 +0200 Subject: [PATCH 19/25] test manual build --- .github/workflows/build-debian-image-dev.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-debian-image-dev.yml b/.github/workflows/build-debian-image-dev.yml index 30a82fc..9c53bfe 100644 --- a/.github/workflows/build-debian-image-dev.yml +++ b/.github/workflows/build-debian-image-dev.yml @@ -58,17 +58,14 @@ jobs: run: | # Build the Docker image for all platforms docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7 -t ghcr.io/buanet/iobroker:dev -f ./debian/node18/Dockerfile ./debian - - # Create the Docker manifest for the image - docker manifest create ghcr.io/buanet/iobroker:dev ghcr.io/buanet/iobroker:dev-amd64 ghcr.io/buanet/iobroker:dev-arm64 ghcr.io/buanet/iobroker:dev-armv7 - - # Annotate the manifest with the architecture details - docker manifest annotate ghcr.io/buanet/iobroker:dev ghcr.io/buanet/iobroker:dev-amd64 --os linux --arch amd64 - docker manifest annotate ghcr.io/buanet/iobroker:dev ghcr.io/buanet/iobroker:dev-arm64 --os linux --arch arm64 - docker manifest annotate ghcr.io/buanet/iobroker:dev ghcr.io/buanet/iobroker:dev-armv7 --os linux --arch arm --variant v7 + + # Build manifest for dev-amd64 + echo $(docker manifest inspect ghcr.io/buanet/iobroker:dev) | jq -r '.manifests[] | select(.platform.architecture == "amd64") | .digest' + docker manifest create ghcr.io/buanet/iobroker:dev-amd64 \ + ghcr.io/buanet/iobroker@$(echo $(docker manifest inspect ghcr.io/buanet/iobroker:dev) | jq -r '.manifests[] | select(.platform.architecture == "amd64") | .digest') # Push the Docker manifest to the registry - docker manifest push ghcr.io/buanet/iobroker:dev + docker manifest push ghcr.io/buanet/iobroker:dev-amd64 # - name: Extract metadata (tags, labels) # id: metadata From c79d4a9fde70276a6fa32f9f20d621dc5bb899ca Mon Sep 17 00:00:00 2001 From: buanet Date: Wed, 12 Apr 2023 15:12:37 +0200 Subject: [PATCH 20/25] revert changes --- .github/workflows/build-debian-image-dev.yml | 91 ++++++++------------ 1 file changed, 38 insertions(+), 53 deletions(-) diff --git a/.github/workflows/build-debian-image-dev.yml b/.github/workflows/build-debian-image-dev.yml index 9c53bfe..c643302 100644 --- a/.github/workflows/build-debian-image-dev.yml +++ b/.github/workflows/build-debian-image-dev.yml @@ -52,60 +52,45 @@ jobs: username: ${{ secrets.PACKAGES_USER }} password: ${{ secrets.PACKAGES_PASS }} + - name: Extract metadata (tags, labels) + id: metadata + uses: docker/metadata-action@v4.3.0 + with: + images: | + buanet/iobroker + ghcr.io/buanet/iobroker + tags: | + type=raw,value=dev + labels: | + org.opencontainers.image.title=Official ioBroker Docker Image + org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net) + org.opencontainers.image.documentation=https://github.com/buanet/ioBroker.docker#readme + org.opencontainers.image.authors=André Germann + org.opencontainers.image.url=https://github.com/buanet/ioBroker.docker + org.opencontainers.image.source=https://github.com/buanet/ioBroker.docker + org.opencontainers.image.base.name=docker.io/library/debian:bullseye-slim + org.opencontainers.image.version=${{ env.VERSION }} + org.opencontainers.image.created=${{ env.DATI }} + - name: Build and push Docker image - env: - DOCKER_BUILDKIT: 1 - run: | - # Build the Docker image for all platforms - docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7 -t ghcr.io/buanet/iobroker:dev -f ./debian/node18/Dockerfile ./debian - - # Build manifest for dev-amd64 - echo $(docker manifest inspect ghcr.io/buanet/iobroker:dev) | jq -r '.manifests[] | select(.platform.architecture == "amd64") | .digest' - docker manifest create ghcr.io/buanet/iobroker:dev-amd64 \ - ghcr.io/buanet/iobroker@$(echo $(docker manifest inspect ghcr.io/buanet/iobroker:dev) | jq -r '.manifests[] | select(.platform.architecture == "amd64") | .digest') - - # Push the Docker manifest to the registry - docker manifest push ghcr.io/buanet/iobroker:dev-amd64 - -# - name: Extract metadata (tags, labels) -# id: metadata -# uses: docker/metadata-action@v4.3.0 -# with: -# images: | -# buanet/iobroker -# ghcr.io/buanet/iobroker + uses: docker/build-push-action@v4.0.0 + with: + context: ./debian + file: ./debian/node18/Dockerfile + push: true + platforms: | + linux/amd64 + linux/arm/v7 + linux/arm64/v8 + tags: ${{ steps.metadata.outputs.tags }} + labels: ${{ steps.metadata.outputs.labels }} # tags: | -# type=raw,value=dev -# labels: | -# org.opencontainers.image.title=Official ioBroker Docker Image -# org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net) -# org.opencontainers.image.documentation=https://github.com/buanet/ioBroker.docker#readme -# org.opencontainers.image.authors=André Germann -# org.opencontainers.image.url=https://github.com/buanet/ioBroker.docker -# org.opencontainers.image.source=https://github.com/buanet/ioBroker.docker -# org.opencontainers.image.base.name=docker.io/library/debian:bullseye-slim -# org.opencontainers.image.version=${{ env.VERSION }} -# org.opencontainers.image.created=${{ env.DATI }} - -# - name: Build and push Docker image -# uses: docker/build-push-action@v4.0.0 -# with: -# context: ./debian -# file: ./debian/node18/Dockerfile -# push: true -# platforms: | -# linux/amd64 -# linux/arm/v7 -# linux/arm64/v8 -# tags: ${{ steps.metadata.outputs.tags }} -# labels: ${{ steps.metadata.outputs.labels }} -## tags: | -## buanet/iobroker:dev, -## ghcr.io/buanet/iobroker:dev -# provenance: false -# outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net) -# cache-from: type=gha -# cache-to: type=gha,mode=max +# buanet/iobroker:dev, +# ghcr.io/buanet/iobroker:dev + provenance: false + outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net) + cache-from: type=gha + cache-to: type=gha,mode=max - name: Delete untagged images from GitHub Container Registry uses: actions/github-script@v6.4.1 @@ -125,4 +110,4 @@ jobs: env: OWNER: buanet PACKAGE_NAME: iobroker - PER_PAGE: 100 + PER_PAGE: 100 From 3a745f97bc367c23e724db0d70e5907d9ca69779 Mon Sep 17 00:00:00 2001 From: buanet Date: Fri, 14 Apr 2023 19:49:31 +0200 Subject: [PATCH 21/25] add .gitignore --- .vscode/settings.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 8ef1e9b..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "cSpell.enableFiletypes": [ - "shellscript" - ] -} \ No newline at end of file From d126eb190bb8b29f38592c61ecc7b92e72ca48ea Mon Sep 17 00:00:00 2001 From: buanet Date: Fri, 14 Apr 2023 19:49:50 +0200 Subject: [PATCH 22/25] add gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dbe9c82 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/ \ No newline at end of file From 874b6d8af07ccca3c0f3904debe8897940eafa7b Mon Sep 17 00:00:00 2001 From: buanet Date: Fri, 14 Apr 2023 20:08:15 +0200 Subject: [PATCH 23/25] prepare beta --- .github/workflows/build-debian-image-beta.yml | 10 ++++++- .github/workflows/build-debian-image-dev.yml | 28 ++----------------- CHANGELOG.md | 1 + 3 files changed, 13 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build-debian-image-beta.yml b/.github/workflows/build-debian-image-beta.yml index 463cc4a..5866c95 100644 --- a/.github/workflows/build-debian-image-beta.yml +++ b/.github/workflows/build-debian-image-beta.yml @@ -64,12 +64,20 @@ jobs: context: ./debian file: ./debian/node18/Dockerfile push: true - platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 + platforms: | + linux/amd64 + linux/arm/v7 + linux/arm64/v8 tags: | buanet/iobroker:beta, buanet/iobroker:${{ env.version }}, ghcr.io/buanet/iobroker:beta, ghcr.io/buanet/iobroker:${{ env.version }} + provenance: false + outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net) + cache-from: type=gha + cache-to: type=gha,mode=max + - name: Delete untagged images from GitHub packages uses: actions/github-script@v6 diff --git a/.github/workflows/build-debian-image-dev.yml b/.github/workflows/build-debian-image-dev.yml index c643302..0c5cadc 100644 --- a/.github/workflows/build-debian-image-dev.yml +++ b/.github/workflows/build-debian-image-dev.yml @@ -52,26 +52,6 @@ jobs: username: ${{ secrets.PACKAGES_USER }} password: ${{ secrets.PACKAGES_PASS }} - - name: Extract metadata (tags, labels) - id: metadata - uses: docker/metadata-action@v4.3.0 - with: - images: | - buanet/iobroker - ghcr.io/buanet/iobroker - tags: | - type=raw,value=dev - labels: | - org.opencontainers.image.title=Official ioBroker Docker Image - org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net) - org.opencontainers.image.documentation=https://github.com/buanet/ioBroker.docker#readme - org.opencontainers.image.authors=André Germann - org.opencontainers.image.url=https://github.com/buanet/ioBroker.docker - org.opencontainers.image.source=https://github.com/buanet/ioBroker.docker - org.opencontainers.image.base.name=docker.io/library/debian:bullseye-slim - org.opencontainers.image.version=${{ env.VERSION }} - org.opencontainers.image.created=${{ env.DATI }} - - name: Build and push Docker image uses: docker/build-push-action@v4.0.0 with: @@ -82,11 +62,9 @@ jobs: linux/amd64 linux/arm/v7 linux/arm64/v8 - tags: ${{ steps.metadata.outputs.tags }} - labels: ${{ steps.metadata.outputs.labels }} -# tags: | -# buanet/iobroker:dev, -# ghcr.io/buanet/iobroker:dev + tags: | + buanet/iobroker:dev, + ghcr.io/buanet/iobroker:dev provenance: false outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net) cache-from: type=gha diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d4e7a3..3e07419 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Changelog ### v8.1.0-beta.1 (coming soon) +* enhance github actions * enhance log output of maintenance script on restore ([#333](https://github.com/buanet/ioBroker.docker/issues/333)) * allow iobroker admin to be disabled at startup ([#332](https://github.com/buanet/ioBroker.docker/issues/332)) * allow deletion of objects and states db password with value "none" ([#306](https://github.com/buanet/ioBroker.docker/issues/306)) From 9afa6646c2d4a3fb4546dbc13d8c2b39470f3cf9 Mon Sep 17 00:00:00 2001 From: buanet Date: Fri, 14 Apr 2023 21:59:40 +0200 Subject: [PATCH 24/25] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e07419..ce8c04d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## Changelog -### v8.1.0-beta.1 (coming soon) +### v8.1.0-beta.1 (14.04.2023) * enhance github actions * enhance log output of maintenance script on restore ([#333](https://github.com/buanet/ioBroker.docker/issues/333)) * allow iobroker admin to be disabled at startup ([#332](https://github.com/buanet/ioBroker.docker/issues/332)) From f60c87388c8a93bbe8941d95f5573546e69f6027 Mon Sep 17 00:00:00 2001 From: buanet Date: Sun, 16 Apr 2023 13:59:37 +0200 Subject: [PATCH 25/25] remove cache --- .github/workflows/build-debian-image-beta.yml | 3 --- .github/workflows/build-debian-image-dev.yml | 2 -- 2 files changed, 5 deletions(-) diff --git a/.github/workflows/build-debian-image-beta.yml b/.github/workflows/build-debian-image-beta.yml index 5866c95..135298b 100644 --- a/.github/workflows/build-debian-image-beta.yml +++ b/.github/workflows/build-debian-image-beta.yml @@ -75,9 +75,6 @@ jobs: ghcr.io/buanet/iobroker:${{ env.version }} provenance: false outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net) - cache-from: type=gha - cache-to: type=gha,mode=max - - name: Delete untagged images from GitHub packages uses: actions/github-script@v6 diff --git a/.github/workflows/build-debian-image-dev.yml b/.github/workflows/build-debian-image-dev.yml index 0c5cadc..ecda6d6 100644 --- a/.github/workflows/build-debian-image-dev.yml +++ b/.github/workflows/build-debian-image-dev.yml @@ -67,8 +67,6 @@ jobs: ghcr.io/buanet/iobroker:dev provenance: false outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net) - cache-from: type=gha - cache-to: type=gha,mode=max - name: Delete untagged images from GitHub Container Registry uses: actions/github-script@v6.4.1