diff --git a/.VERSION b/.VERSION index 8b35a5b..f564199 100644 --- a/.VERSION +++ b/.VERSION @@ -1 +1 @@ -v10.0.1-beta.1 +v10.1.0-beta.1 diff --git a/.github/workflows/build-debian12-beta.yml b/.github/workflows/build-debian12-beta.yml deleted file mode 100644 index 5da2cf9..0000000 --- a/.github/workflows/build-debian12-beta.yml +++ /dev/null @@ -1,160 +0,0 @@ -# Github action to build Debian12 image (Tag: beta) -name: Build Debian 12 Image (beta) - -on: - release: - types: [prereleased] - workflow_dispatch: - inputs: - chose_node_version: - type: choice - description: 'Which Node version should be used?' - options: - - 'Recommended Node version (default)' - - 'Experimental Node version' - - 'Both Node versions' - -jobs: - build-with-recommended-node: - if: inputs.chose_node_version == 'Recommended Node version (default)' || inputs.chose_node_version == 'Both Node versions' || github.event_name == 'release' - name: Build with recommended Node version - runs-on: ubuntu-latest - steps: - - name: Fetch latest prerelease tag - run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - - name: Checkout repo - uses: actions/checkout@v4.2.2 - with: - repository: 'buanet/ioBroker.docker' - ref: ${{ env.RELEASE_TAG }} - - - name: Set job variables - run: | - VERSION="$(cat .VERSION)" - MAJORVERSION="$(cat .VERSION | cut -c 1-3 | sed -r 's#^(.{0})#\1latest-#')" - DATI="$(date --rfc-3339=seconds | sed 's/ /T/')" - # Log output and export as Github environment variable - echo "[LOG] Nodejs Version: ${{ vars.RECOMMENDED_NODE_VERSION_BETA }}" - echo "[LOG] Image Version: $VERSION" - echo "version=$VERSION" >> $GITHUB_ENV - echo "[LOG] Major Image Version: $MAJORVERSION" - echo "majorversion=$MAJORVERSION" >> $GITHUB_ENV - echo "[LOG] Buildnumber/Timestamp: $DATI" - echo "dati=$DATI" >> $GITHUB_ENV - # Set values in iobroker_startup.sh - sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$DATI/" ./debian12/scripts/iobroker_startup.sh > ./debian12/scripts/iobroker_startup.tmp - mv -f ./debian12/scripts/iobroker_startup.tmp ./debian12/scripts/iobroker_startup.sh - # Set values in Dockerfile - sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$DATI/" -e "s/\${NODE}/${{ vars.RECOMMENDED_NODE_VERSION_BETA }}/" ./debian12/Dockerfile > ./debian12/Dockerfile.tmp - mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3.6.0 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3.10.0 - - - name: Login to DockerHub - uses: docker/login-action@v3.4.0 - with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3.4.0 - with: - registry: ghcr.io - username: ${{ secrets.PACKAGES_USER }} - password: ${{ secrets.PACKAGES_PASS }} - - - name: Build and push Docker image - uses: docker/build-push-action@v6.17.0 - with: - context: ./debian12 - file: ./debian12/Dockerfile - push: true - platforms: | - linux/amd64 - linux/arm64/v8 - linux/arm/v7 - 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) - - build-with-experimental-node: - if: inputs.chose_node_version == 'Experimental Node version' || inputs.chose_node_version == 'Both Node versions' || github.event_name == 'release' - name: Build with experimental Node version - runs-on: ubuntu-latest - steps: - - name: Fetch latest prerelease tag - run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - - name: Checkout repo - uses: actions/checkout@v4.2.2 - with: - repository: 'buanet/ioBroker.docker' - ref: ${{ env.RELEASE_TAG }} - - - name: Set job variables - run: | - VERSION="$(cat .VERSION)" - MAJORVERSION="$(cat .VERSION | cut -c 1-3 | sed -r 's#^(.{0})#\1latest-#')" - DATI="$(date --rfc-3339=seconds | sed 's/ /T/')" - # Log output and export as Github environment variable - echo "[LOG] Nodejs Version: ${{ vars.EXPERIMENTAL_NODE_VERSION_BETA }}" - echo "[LOG] Image Version: $VERSION" - echo "version=$VERSION" >> $GITHUB_ENV - echo "[LOG] Major Image Version: $MAJORVERSION" - echo "majorversion=$MAJORVERSION" >> $GITHUB_ENV - echo "[LOG] Buildnumber/Timestamp: $DATI" - echo "dati=$DATI" >> $GITHUB_ENV - # Set values in iobroker_startup.sh - sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$DATI/" ./debian12/scripts/iobroker_startup.sh > ./debian12/scripts/iobroker_startup.tmp - mv -f ./debian12/scripts/iobroker_startup.tmp ./debian12/scripts/iobroker_startup.sh - # Set values in Dockerfile - sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$DATI/" -e "s/\${NODE}/${{ vars.EXPERIMENTAL_NODE_VERSION_BETA }}/" ./debian12/Dockerfile > ./debian12/Dockerfile.tmp - mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3.6.0 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3.10.0 - - - name: Login to DockerHub - uses: docker/login-action@v3.4.0 - with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3.4.0 - with: - registry: ghcr.io - username: ${{ secrets.PACKAGES_USER }} - password: ${{ secrets.PACKAGES_PASS }} - - - name: Build and push Docker image - uses: docker/build-push-action@v6.17.0 - with: - context: ./debian12 - file: ./debian12/Dockerfile - push: true - platforms: | - linux/amd64 - linux/arm64/v8 - linux/arm/v7 - tags: | - buanet/iobroker:beta-node${{ vars.EXPERIMENTAL_NODE_VERSION_BETA }}, - buanet/iobroker:${{ env.version }}-node${{ vars.EXPERIMENTAL_NODE_VERSION_BETA }}, - ghcr.io/buanet/iobroker:beta-node${{ vars.EXPERIMENTAL_NODE_VERSION_BETA }}, - ghcr.io/buanet/iobroker:${{ env.version }}-node${{ vars.EXPERIMENTAL_NODE_VERSION_BETA }} - provenance: false - outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net) diff --git a/.github/workflows/build-debian12-beta_sep.yml b/.github/workflows/build-debian12-beta_sep.yml new file mode 100644 index 0000000..fc81cbc --- /dev/null +++ b/.github/workflows/build-debian12-beta_sep.yml @@ -0,0 +1,477 @@ +# Github action to build Debian12 image (Tag: beta) +name: Build Debian 12 Image (beta) + +on: + release: + types: [prereleased] + workflow_dispatch: + +jobs: + create-build-number: + name: Create build number + runs-on: ubuntu-latest + outputs: + build_number: ${{ steps.generate-build-number.outputs.build_number }} + release_tag: ${{ steps.fetch-prerelease-tag.outputs.release_tag }} + steps: + - name: Fetch latest prerelease tag + run: | + PRERELEASE_TAG=$(curl -sL "https://api.github.com/repos/buanet/ioBroker.docker/releases" | jq -r '[.[] | select(.prerelease)][0].tag_name') + if [ -z "$PRERELEASE_TAG" ]; then + echo "[LOG] No prerelease found!" >&2 + exit 1 + fi + echo "RELEASE_TAG=$PRERELEASE_TAG" >> $GITHUB_ENV + echo "release_tag=$PRERELEASE_TAG" >> $GITHUB_OUTPUT + echo "[LOG] Release tag: $PRERELEASE_TAG" + + - name: Checkout repo + uses: actions/checkout@v4.1.7 + with: + repository: 'buanet/ioBroker.docker' + ref: ${{ env.RELEASE_TAG }} + + - name: Generate build number + id: generate-build-number + run: | + BUILD="$(date +"%Y%m%d.%H%M%S")" + echo "build_number=$BUILD" >> $GITHUB_OUTPUT + echo "[LOG] Buildnumber: $BUILD" + + build-beta-armv7-recommended-node: + name: Build beta armv7 image with recommended node version + needs: [create-build-number] + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4.1.7 + with: + repository: 'buanet/ioBroker.docker' + ref: ${{ needs.create-build-number.outputs.release_tag }} + + - name: Set job variables + run: | + VERSION="$(cat .VERSION)" + BUILD="${{ needs.create-build-number.outputs.build_number }}" + # Log output and export as Github environment variable + echo "[LOG] Nodejs Version: ${{ vars.RECOMMENDED_NODE_VERSION }}" + echo "[LOG] Image Version: $VERSION" + echo "version=$VERSION" >> $GITHUB_ENV + echo "[LOG] Buildnumber: $BUILD" + echo "build=$BUILD" >> $GITHUB_ENV + # Set values in iobroker_startup.sh + sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$BUILD/" ./debian12/scripts/iobroker_startup.sh > ./debian12/scripts/iobroker_startup.tmp + mv -f ./debian12/scripts/iobroker_startup.tmp ./debian12/scripts/iobroker_startup.sh + # Set values in Dockerfile + sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$BUILD/" -e "s/\${BUILD}/$BUILD/" -e "s/\${NODE}/${{ vars.RECOMMENDED_NODE_VERSION }}/" ./debian12/Dockerfile > ./debian12/Dockerfile.tmp + mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.2.0 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3.6.1 + + - name: Login to DockerHub (buanet) + uses: docker/login-action@v3.3.0 + with: + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASS }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3.3.0 + with: + registry: ghcr.io + username: ${{ secrets.PACKAGES_USER }} + password: ${{ secrets.PACKAGES_PASS }} + + - name: Build and push Docker image + uses: docker/build-push-action@v6.6.1 + with: + context: ./debian12 + file: ./debian12/Dockerfile + push: true + platforms: linux/arm/v7 + tags: | + buanet/iobroker:${{ env.version }}-build.${{ env.build }}-armv7, + ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-armv7, + + build-beta-arm64v8-recommended-node: + name: Build beta armv64v8 image with recommended node version + needs: [create-build-number] + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4.1.7 + with: + repository: 'buanet/ioBroker.docker' + ref: ${{ needs.create-build-number.outputs.release_tag }} + + - name: Set job variables + run: | + VERSION="$(cat .VERSION)" + BUILD="${{ needs.create-build-number.outputs.build_number }}" + # Log output and export as Github environment variable + echo "[LOG] Nodejs Version: ${{ vars.RECOMMENDED_NODE_VERSION }}" + echo "[LOG] Image Version: $VERSION" + echo "version=$VERSION" >> $GITHUB_ENV + echo "[LOG] Buildnumber: $BUILD" + echo "build=$BUILD" >> $GITHUB_ENV + # Set values in iobroker_startup.sh + sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$BUILD/" ./debian12/scripts/iobroker_startup.sh > ./debian12/scripts/iobroker_startup.tmp + mv -f ./debian12/scripts/iobroker_startup.tmp ./debian12/scripts/iobroker_startup.sh + # Set values in Dockerfile + sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$BUILD/" -e "s/\${BUILD}/$BUILD/" -e "s/\${NODE}/${{ vars.RECOMMENDED_NODE_VERSION }}/" ./debian12/Dockerfile > ./debian12/Dockerfile.tmp + mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.2.0 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3.6.1 + + - name: Login to DockerHub (buanet) + uses: docker/login-action@v3.3.0 + with: + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASS }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3.3.0 + with: + registry: ghcr.io + username: ${{ secrets.PACKAGES_USER }} + password: ${{ secrets.PACKAGES_PASS }} + + - name: Build and push Docker image + uses: docker/build-push-action@v6.6.1 + with: + context: ./debian12 + file: ./debian12/Dockerfile + push: true + platforms: linux/arm64/v8 + tags: | + buanet/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8, + ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8, + + build-beta-amd64-recommended-node: + name: Build beta amd64 image with recommended node version + needs: [create-build-number] + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4.1.7 + with: + repository: 'buanet/ioBroker.docker' + ref: ${{ needs.create-build-number.outputs.release_tag }} + + - name: Set job variables + run: | + VERSION="$(cat .VERSION)" + BUILD="${{ needs.create-build-number.outputs.build_number }}" + # Log output and export as Github environment variable + echo "[LOG] Nodejs Version: ${{ vars.RECOMMENDED_NODE_VERSION }}" + echo "[LOG] Image Version: $VERSION" + echo "version=$VERSION" >> $GITHUB_ENV + echo "[LOG] Buildnumber: $BUILD" + echo "build=$BUILD" >> $GITHUB_ENV + # Set values in iobroker_startup.sh + sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$BUILD/" ./debian12/scripts/iobroker_startup.sh > ./debian12/scripts/iobroker_startup.tmp + mv -f ./debian12/scripts/iobroker_startup.tmp ./debian12/scripts/iobroker_startup.sh + # Set values in Dockerfile + sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$BUILD/" -e "s/\${BUILD}/$BUILD/" -e "s/\${NODE}/${{ vars.RECOMMENDED_NODE_VERSION }}/" ./debian12/Dockerfile > ./debian12/Dockerfile.tmp + mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3.6.1 + + - name: Login to DockerHub (buanet) + uses: docker/login-action@v3.3.0 + with: + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASS }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3.3.0 + with: + registry: ghcr.io + username: ${{ secrets.PACKAGES_USER }} + password: ${{ secrets.PACKAGES_PASS }} + + - name: Build and push Docker image + uses: docker/build-push-action@v6.6.1 + with: + context: ./debian12 + file: ./debian12/Dockerfile + push: true + platforms: linux/amd64 + tags: | + buanet/iobroker:${{ env.version }}-build.${{ env.build }}-amd64, + ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-amd64, + + create-multiarch-image-with-recommended-node: + name: Create multiarch image with recommended node version + runs-on: ubuntu-latest + needs: [build-beta-armv7-recommended-node, build-beta-arm64v8-recommended-node, build-beta-amd64-recommended-node] + steps: + - name: Checkout repo + uses: actions/checkout@v4.1.7 + with: + repository: 'buanet/ioBroker.docker' + ref: ${{ needs.create-build-number.outputs.release_tag }} + + - name: Set job variables + run: | + VERSION="$(cat .VERSION)" + BUILD="${{ needs.create-build-number.outputs.build_number }}" + # Log output and export as Github environment variable + echo "[LOG] Nodejs Version: ${{ vars.RECOMMENDED_NODE_VERSION }}" + echo "[LOG] Image Version: $VERSION" + echo "version=$VERSION" >> $GITHUB_ENV + echo "[LOG] Buildnumber: $BUILD" + echo "build=$BUILD" >> $GITHUB_ENV + + - name: Login to DockerHub (buanet) + uses: docker/login-action@v3.3.0 + with: + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASS }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3.3.0 + with: + registry: ghcr.io + username: ${{ secrets.PACKAGES_USER }} + password: ${{ secrets.PACKAGES_PASS }} + + - name: Create and push multi-platform image + run: | + docker buildx imagetools create -t buanet/iobroker:beta buanet/iobroker:${{ env.version }}-build.${{ env.build }}-armv7 buanet/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8 buanet/iobroker:${{ env.version }}-build.${{ env.build }}-amd64 + docker buildx imagetools create -t ghcr.io/buanet/iobroker:beta ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-armv7 ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8 ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-amd64 + docker buildx imagetools create -t buanet/iobroker:${{ env.version }} buanet/iobroker:${{ env.version }}-build.${{ env.build }}-armv7 buanet/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8 buanet/iobroker:${{ env.version }}-build.${{ env.build }}-amd64 + docker buildx imagetools create -t ghcr.io/buanet/iobroker:${{ env.version }} ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-armv7 ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8 ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-amd64 + docker buildx imagetools create -t buanet/iobroker:${{ env.version }}-build.${{ env.build }} buanet/iobroker:${{ env.version }}-build.${{ env.build }}-armv7 buanet/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8 buanet/iobroker:${{ env.version }}-build.${{ env.build }}-amd64 + docker buildx imagetools create -t ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }} ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-armv7 ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8 ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-amd64 + +### experimental node version + + build-beta-armv7-experimental-node: + name: Build beta armv7 image with experimental node version + needs: [create-build-number] + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4.1.7 + with: + repository: 'buanet/ioBroker.docker' + ref: ${{ needs.create-build-number.outputs.release_tag }} + + - name: Set job variables + run: | + VERSION="$(cat .VERSION)" + BUILD="${{ needs.create-build-number.outputs.build_number }}" + # Log output and export as Github environment variable + echo "[LOG] Nodejs Version: ${{ vars.EXPERIMENTAL_NODE_VERSION }}" + echo "[LOG] Image Version: $VERSION" + echo "version=$VERSION" >> $GITHUB_ENV + echo "[LOG] Buildnumber: $BUILD" + echo "build=$BUILD" >> $GITHUB_ENV + # Set values in iobroker_startup.sh + sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$BUILD/" ./debian12/scripts/iobroker_startup.sh > ./debian12/scripts/iobroker_startup.tmp + mv -f ./debian12/scripts/iobroker_startup.tmp ./debian12/scripts/iobroker_startup.sh + # Set values in Dockerfile + sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$BUILD/" -e "s/\${BUILD}/$BUILD/" -e "s/\${NODE}/${{ vars.EXPERIMENTAL_NODE_VERSION }}/" ./debian12/Dockerfile > ./debian12/Dockerfile.tmp + mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.2.0 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3.6.1 + + - name: Login to DockerHub (buanet) + uses: docker/login-action@v3.3.0 + with: + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASS }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3.3.0 + with: + registry: ghcr.io + username: ${{ secrets.PACKAGES_USER }} + password: ${{ secrets.PACKAGES_PASS }} + + - name: Build and push Docker image + uses: docker/build-push-action@v6.6.1 + with: + context: ./debian12 + file: ./debian12/Dockerfile + push: true + platforms: linux/arm/v7 + tags: | + buanet/iobroker:${{ env.version }}-build.${{ env.build }}-armv7-node${{ vars.EXPERIMENTAL_NODE_VERSION }}, + ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-armv7-node${{ vars.EXPERIMENTAL_NODE_VERSION }}, + + build-beta-arm64v8-experimental-node: + name: Build beta armv64v8 image with experimental node version + needs: [create-build-number] + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4.1.7 + with: + repository: 'buanet/ioBroker.docker' + ref: ${{ needs.create-build-number.outputs.release_tag }} + + - name: Set job variables + run: | + VERSION="$(cat .VERSION)" + BUILD="${{ needs.create-build-number.outputs.build_number }}" + # Log output and export as Github environment variable + echo "[LOG] Nodejs Version: ${{ vars.EXPERIMENTAL_NODE_VERSION }}" + echo "[LOG] Image Version: $VERSION" + echo "version=$VERSION" >> $GITHUB_ENV + echo "[LOG] Buildnumber: $BUILD" + echo "build=$BUILD" >> $GITHUB_ENV + # Set values in iobroker_startup.sh + sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$BUILD/" ./debian12/scripts/iobroker_startup.sh > ./debian12/scripts/iobroker_startup.tmp + mv -f ./debian12/scripts/iobroker_startup.tmp ./debian12/scripts/iobroker_startup.sh + # Set values in Dockerfile + sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$BUILD/" -e "s/\${BUILD}/$BUILD/" -e "s/\${NODE}/${{ vars.EXPERIMENTAL_NODE_VERSION }}/" ./debian12/Dockerfile > ./debian12/Dockerfile.tmp + mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.2.0 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3.6.1 + + - name: Login to DockerHub (buanet) + uses: docker/login-action@v3.3.0 + with: + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASS }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3.3.0 + with: + registry: ghcr.io + username: ${{ secrets.PACKAGES_USER }} + password: ${{ secrets.PACKAGES_PASS }} + + - name: Build and push Docker image + uses: docker/build-push-action@v6.6.1 + with: + context: ./debian12 + file: ./debian12/Dockerfile + push: true + platforms: linux/arm64/v8 + tags: | + buanet/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8-node${{ vars.EXPERIMENTAL_NODE_VERSION }}, + ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8-node${{ vars.EXPERIMENTAL_NODE_VERSION }}, + + build-beta-amd64-experimental-node: + name: Build beta amd64 image with experimental node version + needs: [create-build-number] + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4.1.7 + with: + repository: 'buanet/ioBroker.docker' + ref: ${{ needs.create-build-number.outputs.release_tag }} + + - name: Set job variables + run: | + VERSION="$(cat .VERSION)" + BUILD="${{ needs.create-build-number.outputs.build_number }}" + # Log output and export as Github environment variable + echo "[LOG] Nodejs Version: ${{ vars.EXPERIMENTAL_NODE_VERSION }}" + echo "[LOG] Image Version: $VERSION" + echo "version=$VERSION" >> $GITHUB_ENV + echo "[LOG] Buildnumber: $BUILD" + echo "build=$BUILD" >> $GITHUB_ENV + # Set values in iobroker_startup.sh + sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$BUILD/" ./debian12/scripts/iobroker_startup.sh > ./debian12/scripts/iobroker_startup.tmp + mv -f ./debian12/scripts/iobroker_startup.tmp ./debian12/scripts/iobroker_startup.sh + # Set values in Dockerfile + sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$BUILD/" -e "s/\${BUILD}/$BUILD/" -e "s/\${NODE}/${{ vars.EXPERIMENTAL_NODE_VERSION }}/" ./debian12/Dockerfile > ./debian12/Dockerfile.tmp + mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3.6.1 + + - name: Login to DockerHub (buanet) + uses: docker/login-action@v3.3.0 + with: + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASS }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3.3.0 + with: + registry: ghcr.io + username: ${{ secrets.PACKAGES_USER }} + password: ${{ secrets.PACKAGES_PASS }} + + - name: Build and push Docker image + uses: docker/build-push-action@v6.6.1 + with: + context: ./debian12 + file: ./debian12/Dockerfile + push: true + platforms: linux/amd64 + tags: | + buanet/iobroker:${{ env.version }}-build.${{ env.build }}-amd64-node${{ vars.EXPERIMENTAL_NODE_VERSION }}, + ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-amd64-node${{ vars.EXPERIMENTAL_NODE_VERSION }}, + + create-multiarch-image-with-experimental-node: + name: Create multiarch image with experimental node version + runs-on: ubuntu-latest + needs: [build-beta-armv7-experimental-node, build-beta-arm64v8-experimental-node, build-beta-amd64-experimental-node] + steps: + - name: Checkout repo + uses: actions/checkout@v4.1.7 + with: + repository: 'buanet/ioBroker.docker' + ref: ${{ needs.create-build-number.outputs.release_tag }} + + - name: Set job variables + run: | + VERSION="$(cat .VERSION)" + BUILD="${{ needs.create-build-number.outputs.build_number }}" + # Log output and export as Github environment variable + echo "[LOG] Nodejs Version: ${{ vars.EXPERIMENTAL_NODE_VERSION }}" + echo "[LOG] Image Version: $VERSION" + echo "version=$VERSION" >> $GITHUB_ENV + echo "[LOG] Buildnumber: $BUILD" + echo "build=$BUILD" >> $GITHUB_ENV + + - name: Login to DockerHub (buanet) + uses: docker/login-action@v3.3.0 + with: + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASS }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3.3.0 + with: + registry: ghcr.io + username: ${{ secrets.PACKAGES_USER }} + password: ${{ secrets.PACKAGES_PASS }} + + - name: Create and push multi-platform image + run: | + docker buildx imagetools create -t buanet/iobroker:beta-node${{ vars.EXPERIMENTAL_NODE_VERSION }} buanet/iobroker:${{ env.version }}-build.${{ env.build }}-armv7-node${{ vars.EXPERIMENTAL_NODE_VERSION }} buanet/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8-node${{ vars.EXPERIMENTAL_NODE_VERSION }} buanet/iobroker:${{ env.version }}-build.${{ env.build }}-amd64-node${{ vars.EXPERIMENTAL_NODE_VERSION }} + docker buildx imagetools create -t ghcr.io/buanet/iobroker:beta-node${{ vars.EXPERIMENTAL_NODE_VERSION }} ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-armv7-node${{ vars.EXPERIMENTAL_NODE_VERSION }} ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8-node${{ vars.EXPERIMENTAL_NODE_VERSION }} ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-amd64-node${{ vars.EXPERIMENTAL_NODE_VERSION }} + docker buildx imagetools create -t buanet/iobroker:${{ env.version }}-node${{ vars.EXPERIMENTAL_NODE_VERSION }} buanet/iobroker:${{ env.version }}-build.${{ env.build }}-armv7-node${{ vars.EXPERIMENTAL_NODE_VERSION }} buanet/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8-node${{ vars.EXPERIMENTAL_NODE_VERSION }} buanet/iobroker:${{ env.version }}-build.${{ env.build }}-amd64-node${{ vars.EXPERIMENTAL_NODE_VERSION }} + docker buildx imagetools create -t ghcr.io/buanet/iobroker:${{ env.version }}-node${{ vars.EXPERIMENTAL_NODE_VERSION }} ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-armv7-node${{ vars.EXPERIMENTAL_NODE_VERSION }} ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8-node${{ vars.EXPERIMENTAL_NODE_VERSION }} ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-amd64-node${{ vars.EXPERIMENTAL_NODE_VERSION }} + docker buildx imagetools create -t buanet/iobroker:${{ env.version }}-build.${{ env.build }}-node${{ vars.EXPERIMENTAL_NODE_VERSION }} buanet/iobroker:${{ env.version }}-build.${{ env.build }}-armv7-node${{ vars.EXPERIMENTAL_NODE_VERSION }} buanet/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8-node${{ vars.EXPERIMENTAL_NODE_VERSION }} buanet/iobroker:${{ env.version }}-build.${{ env.build }}-amd64-node${{ vars.EXPERIMENTAL_NODE_VERSION }} + docker buildx imagetools create -t ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-node${{ vars.EXPERIMENTAL_NODE_VERSION }} ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-armv7-node${{ vars.EXPERIMENTAL_NODE_VERSION }} ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8-node${{ vars.EXPERIMENTAL_NODE_VERSION }} ghcr.io/buanet/iobroker:${{ env.version }}-build.${{ env.build }}-amd64-node${{ vars.EXPERIMENTAL_NODE_VERSION }} diff --git a/.github/workflows/build-debian12-dev.yml b/.github/workflows/build-debian12-dev.yml deleted file mode 100644 index e2fa600..0000000 --- a/.github/workflows/build-debian12-dev.yml +++ /dev/null @@ -1,144 +0,0 @@ -# Github action to build Debian12 image (Tag: dev) -name: Build Debian 12 Image (dev) - -on: - workflow_dispatch: - inputs: - chose_node_version: - type: choice - description: 'Which Node version should be used?' - options: - - 'Recommended Node version (default)' - - 'Experimental Node version' - - 'Both Node versions' - -jobs: - build-with-recommended-node: - if: inputs.chose_node_version == 'Recommended Node version (default)' || inputs.chose_node_version == 'Both Node versions' - name: Build with recommended Node version - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v4.2.2 - with: - repository: 'buanet/ioBroker.docker' - - - name: Set job variables - run: | - VERSION="$(cat .VERSION)" - MAJORVERSION="$(cat .VERSION | cut -c 1-3 | sed -r 's#^(.{0})#\1latest-#')" - DATI="$(date --rfc-3339=seconds | sed 's/ /T/')" - # Log output and export as Github environment variable - echo "[LOG] Nodejs Version: ${{ vars.RECOMMENDED_NODE_VERSION_BETA }}" - echo "[LOG] Image Version: $VERSION" - echo "version=$VERSION" >> $GITHUB_ENV - echo "[LOG] Major Image Version: $MAJORVERSION" - echo "majorversion=$MAJORVERSION" >> $GITHUB_ENV - echo "[LOG] Buildnumber/Timestamp: $DATI" - echo "dati=$DATI" >> $GITHUB_ENV - # Set values in iobroker_startup.sh - sed -e "s/\${VERSION}/$VERSION-dev/" -e "s/\${BUILD}/$DATI/" ./debian12/scripts/iobroker_startup.sh > ./debian12/scripts/iobroker_startup.tmp - mv -f ./debian12/scripts/iobroker_startup.tmp ./debian12/scripts/iobroker_startup.sh - # Set values in Dockerfile - sed -e "s/\${VERSION}/$VERSION-dev/" -e "s/\${DATI}/$DATI/" -e "s/\${NODE}/${{ vars.RECOMMENDED_NODE_VERSION_BETA }}/" ./debian12/Dockerfile > ./debian12/Dockerfile.tmp - mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3.6.0 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3.10.0 - - - name: Login to DockerHub - uses: docker/login-action@v3.4.0 - with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3.4.0 - with: - registry: ghcr.io - username: ${{ secrets.PACKAGES_USER }} - password: ${{ secrets.PACKAGES_PASS }} - - - name: Build and push Docker image - uses: docker/build-push-action@v6.17.0 - with: - context: ./debian12 - file: ./debian12/Dockerfile - push: true - platforms: | - linux/amd64 - linux/arm64/v8 - linux/arm/v7 - tags: | - buanet/iobroker:dev, - buanet/iobroker:dev-node${{ vars.RECOMMENDED_NODE_VERSION_BETA }}, - ghcr.io/buanet/iobroker:dev, - ghcr.io/buanet/iobroker:dev-node${{ vars.RECOMMENDED_NODE_VERSION_BETA }} - - build-with-experimental-node: - if: inputs.chose_node_version == 'Experimental Node version' || inputs.chose_node_version == 'Both Node versions' - name: Build with experimental Node version - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v4.2.2 - with: - repository: 'buanet/ioBroker.docker' - - - name: Set job variables - run: | - VERSION="$(cat .VERSION)" - MAJORVERSION="$(cat .VERSION | cut -c 1-3 | sed -r 's#^(.{0})#\1latest-#')" - DATI="$(date --rfc-3339=seconds | sed 's/ /T/')" - # Log output and export as Github environment variable - echo "[LOG] Nodejs Version: ${{ vars.EXPERIMENTAL_NODE_VERSION_BETA }}" - echo "[LOG] Image Version: $VERSION" - echo "version=$VERSION" >> $GITHUB_ENV - echo "[LOG] Major Image Version: $MAJORVERSION" - echo "majorversion=$MAJORVERSION" >> $GITHUB_ENV - echo "[LOG] Buildnumber/Timestamp: $DATI" - echo "dati=$DATI" >> $GITHUB_ENV - # Set values in iobroker_startup.sh - sed -e "s/\${VERSION}/$VERSION-dev/" -e "s/\${BUILD}/$DATI/" ./debian12/scripts/iobroker_startup.sh > ./debian12/scripts/iobroker_startup.tmp - mv -f ./debian12/scripts/iobroker_startup.tmp ./debian12/scripts/iobroker_startup.sh - # Set values in Dockerfile - sed -e "s/\${VERSION}/$VERSION-dev/" -e "s/\${DATI}/$DATI/" -e "s/\${NODE}/${{ vars.EXPERIMENTAL_NODE_VERSION_BETA }}/" ./debian12/Dockerfile > ./debian12/Dockerfile.tmp - mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3.6.0 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3.10.0 - - - name: Login to DockerHub - uses: docker/login-action@v3.4.0 - with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3.4.0 - with: - registry: ghcr.io - username: ${{ secrets.PACKAGES_USER }} - password: ${{ secrets.PACKAGES_PASS }} - - - name: Build and push Docker image - uses: docker/build-push-action@v6.17.0 - with: - context: ./debian12 - file: ./debian12/Dockerfile - push: true - platforms: | - linux/amd64 - linux/arm64/v8 - linux/arm/v7 - tags: | - buanet/iobroker:dev-node${{ vars.EXPERIMENTAL_NODE_VERSION_BETA }}, - ghcr.io/buanet/iobroker:dev-node${{ vars.EXPERIMENTAL_NODE_VERSION_BETA }} diff --git a/.github/workflows/old/build-debian12-beta_ext.yml b/.github/workflows/old/build-debian12-beta_ext.yml deleted file mode 100644 index afc2b5c..0000000 --- a/.github/workflows/old/build-debian12-beta_ext.yml +++ /dev/null @@ -1,42 +0,0 @@ -# Github action to trigger external Debian12 image build (Tag: beta) -name: Trigger external Build (beta) - -on: - release: - types: [prereleased] - workflow_dispatch: - inputs: - chose_node_version: - type: choice - description: 'Which Node version should be used?' - options: - - 'Recommended Node version (default)' - - 'Experimental Node version' - - 'Both Node versions' - -jobs: - trigger_beta_build_on_release: - if: github.event_name == 'release' - runs-on: ubuntu-latest - steps: - - name: Trigger beta build on release - uses: benc-uk/workflow-dispatch@v1.2 - with: - ref: 'main' - workflow: 'iob.docker - Build Debian 12 Image (beta)' - repo: 'buanet/private.actionsrunner' - inputs: '{ "chose_node_version": "Both Node versions" }' - token: ${{ secrets.ACTIONS_PAT }} - - trigger_beta_build_manual: - if: github.event_name == 'workflow_dispatch' - runs-on: ubuntu-latest - steps: - - name: Trigger beta build on dispatch - uses: benc-uk/workflow-dispatch@v1.2 - with: - ref: 'main' - workflow: 'iob.docker - Build Debian 12 Image (beta)' - repo: 'buanet/private.actionsrunner' - inputs: '{ "chose_node_version": "${{ inputs.chose_node_version }}" }' - token: ${{ secrets.ACTIONS_PAT }} diff --git a/.github/workflows/old/build-debian12-latest.yml b/.github/workflows/old/build-debian12-latest.yml deleted file mode 100644 index 36a560e..0000000 --- a/.github/workflows/old/build-debian12-latest.yml +++ /dev/null @@ -1,150 +0,0 @@ -# Github action to build Debian12 image (Tag: latest) -name: Build Debian 12 Image (latest) - -on: - release: - types: [released] - workflow_dispatch: - -jobs: - build-latest-for-buanet: - name: Build latest image for buanet - runs-on: ubuntu-latest - steps: - - name: Fetch latest release tag - run: | - LATESTRELEASE="$(curl -sL https://api.github.com/repos/buanet/ioBroker.docker/releases/latest | jq -r '.tag_name')" - echo "Latest release tag : $LATESTRELEASE" - echo "RELEASE_TAG=$LATESTRELEASE" >> $GITHUB_ENV - - - name: Checkout repo - uses: actions/checkout@v4.2.2 - with: - repository: 'buanet/ioBroker.docker' - ref: ${{ env.RELEASE_TAG }} - - - name: Set job variables - run: | - VERSION="$(cat .VERSION)" - MAJORVERSION="$(cat .VERSION | cut -c 1-3 | sed -r 's#^(.{0})#\1latest-#')" - DATI="$(date --rfc-3339=seconds | sed 's/ /T/')" - # Log output and export as Github environment variable - echo "[LOG] Nodejs Version: ${{ vars.RECOMMENDED_NODE_VERSION }}" - echo "[LOG] Image Version: $VERSION" - echo "version=$VERSION" >> $GITHUB_ENV - echo "[LOG] Major Image Version: $MAJORVERSION" - echo "majorversion=$MAJORVERSION" >> $GITHUB_ENV - echo "[LOG] Buildnumber/Timestamp: $DATI" - echo "dati=$DATI" >> $GITHUB_ENV - # Set values in iobroker_startup.sh - sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$DATI/" ./debian12/scripts/iobroker_startup.sh > ./debian12/scripts/iobroker_startup.tmp - mv -f ./debian12/scripts/iobroker_startup.tmp ./debian12/scripts/iobroker_startup.sh - # Set values in Dockerfile - sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$DATI/" -e "s/\${NODE}/${{ vars.RECOMMENDED_NODE_VERSION }}/" ./debian12/Dockerfile > ./debian12/Dockerfile.tmp - mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3.6.0 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3.10.0 - - - name: Login to DockerHub (buanet) - uses: docker/login-action@v3.4.0 - with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3.4.0 - with: - registry: ghcr.io - username: ${{ secrets.PACKAGES_USER }} - password: ${{ secrets.PACKAGES_PASS }} - - - name: Build and push Docker image - uses: docker/build-push-action@v6.17.0 - with: - context: ./debian12 - file: ./debian12/Dockerfile - push: true - platforms: | - linux/amd64 - linux/arm64/v8 - linux/arm/v7 - tags: | - buanet/iobroker:latest, - buanet/iobroker:${{ env.majorversion }}, - buanet/iobroker:${{ env.version }}, - ghcr.io/buanet/iobroker:latest, - ghcr.io/buanet/iobroker:${{ env.majorversion }}, - 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) - - build-latest-for-iobroker: - name: Build latest image for iobroker - runs-on: ubuntu-latest - steps: - - name: Fetch latest release tag - run: | - LATESTRELEASE="$(curl -sL https://api.github.com/repos/buanet/ioBroker.docker/releases/latest | jq -r '.tag_name')" - echo "Latest release tag : $LATESTRELEASE" - echo "RELEASE_TAG=$LATESTRELEASE" >> $GITHUB_ENV - - - name: Checkout repo - uses: actions/checkout@v4.2.2 - with: - repository: 'buanet/ioBroker.docker' - ref: ${{ env.RELEASE_TAG }} - - - name: Set job variables - run: | - VERSION="$(cat .VERSION)" - MAJORVERSION="$(cat .VERSION | cut -c 1-3 | sed -r 's#^(.{0})#\1latest-#')" - DATI="$(date --rfc-3339=seconds | sed 's/ /T/')" - # Log output and export as Github environment variable - echo "[LOG] Nodejs Version: ${{ vars.RECOMMENDED_NODE_VERSION }}" - echo "[LOG] Image Version: $VERSION" - echo "version=$VERSION" >> $GITHUB_ENV - echo "[LOG] Major Image Version: $MAJORVERSION" - echo "majorversion=$MAJORVERSION" >> $GITHUB_ENV - echo "[LOG] Buildnumber/Timestamp: $DATI" - echo "dati=$DATI" >> $GITHUB_ENV - # Set values in iobroker_startup.sh - sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$DATI/" ./debian12/scripts/iobroker_startup.sh > ./debian12/scripts/iobroker_startup.tmp - mv -f ./debian12/scripts/iobroker_startup.tmp ./debian12/scripts/iobroker_startup.sh - # Set values in Dockerfile - sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$DATI/" -e "s/\${NODE}/${{ vars.RECOMMENDED_NODE_VERSION }}/" ./debian12/Dockerfile > ./debian12/Dockerfile.tmp - mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3.6.0 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3.10.0 - - - name: Login to DockerHub (buanet) - uses: docker/login-action@v3.4.0 - with: - username: ${{ secrets.DOCKER_USER_IOB }} - password: ${{ secrets.DOCKER_PASS_IOB }} - - - name: Build and push Docker image - uses: docker/build-push-action@v6.17.0 - with: - context: ./debian12 - file: ./debian12/Dockerfile - push: true - platforms: | - linux/amd64 - linux/arm64/v8 - linux/arm/v7 - tags: | - iobroker/iobroker:latest, - iobroker/iobroker:${{ env.majorversion }}, - iobroker/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) diff --git a/.github/workflows/old/build-debian12-latest_ext.yml b/.github/workflows/old/build-debian12-latest_ext.yml deleted file mode 100644 index 27f8873..0000000 --- a/.github/workflows/old/build-debian12-latest_ext.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Github action to trigger external Debian12 image build (Tag: latest) -name: Trigger external Build (latest) - -on: - release: - types: [released] - workflow_dispatch: - -jobs: - trigger_latest_build_on_release: - runs-on: ubuntu-latest - steps: - - name: Trigger latest build - uses: benc-uk/workflow-dispatch@v1.2 - with: - ref: 'main' - workflow: 'iob.docker - Build Debian 12 Image (latest)' - repo: 'buanet/private.actionsrunner' - token: ${{ secrets.ACTIONS_PAT }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 40b83a9..07d765e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ ## Changelog +### v10.1.0-beta.1 (24.05.2025) +* remove restore option from maintenance script +* restructure build process +* add node22 tag to beta +* update readme and docs +* add sorted list of backups ([#530 by @Marc-Berg](https://github.com/buanet/ioBroker.docker/pull/530)) + ### v10.0.0 (08.08.2024) * v10.0.0-beta.2 (07.08.2024) * add build date to image diff --git a/LICENSE.md b/LICENSE.md index 4e5a865..21eef52 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017-2023 André Germann +Copyright (c) 2017-2025 André Germann Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 1a17a9c..a6a77c3 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ Moved to [CHANGELOG.md](CHANGELOG.md). MIT License -Copyright (c) 2017-2024 André Germann +Copyright (c) 2017-2025 André Germann Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/debian12/scripts/maintenance.sh b/debian12/scripts/maintenance.sh index 9fd0344..131a702 100644 --- a/debian12/scripts/maintenance.sh +++ b/debian12/scripts/maintenance.sh @@ -29,7 +29,6 @@ display_help() { echo " off > switches mantenance mode OFF and stops or restarts the container" echo " upgrade > puts the container to maintenance mode and upgrades ioBroker" echo " restart > stops iobroker and stops or restarts the container" - echo " restore > stops iobroker and restores the last backup" echo " help > shows this help" echo " " echo "OPTIONS" @@ -214,148 +213,10 @@ restart_container() { pkill -u iobroker } -# restore iobroker +# restore iobroker <<< Removed due to changes in backup structure and the availability of the graphical restore with backitup restore_iobroker() { - echo "You are now going to perform a restore of your iobroker." - echo "During the restore process, the container will automatically switch into maintenance mode and stop ioBroker." - echo "Depending on the restart policy, your container will be stopped or restarted automatically after the restore." - - # check autoconfirm - if [[ "$autoconfirm" != yes ]]; then - local reply - read -rp 'Do you want to continue [yes/no]? ' reply - if [[ "$reply" != y && "$reply" != Y && "$reply" != yes ]]; then - return 1 - fi - fi - echo " " - - # check startup script running - if check_starting > /dev/null; then - echo "Startup script is still running." - echo "Please check container log and wait until ioBroker is sucessfully started." - return 1 - fi - - # check mainenance mode - if ! maintenance_enabled > /dev/null; then - autoconfirm=yes - enable_maintenance - fi - - # list backup files - backup_dir="/opt/iobroker/backups" - backup_files=($(find $backup_dir -type f | sort)) - backup_count=${#backup_files[@]} - - if [[ $backup_count -eq 0 ]]; then - echo "Ther are no backup files in $backup_dir." - echo "Please check and try again." - return 1 - elif [[ $backup_count -eq 1 ]]; then - selected_backup=$(basename "${backup_files[0]}") - echo "Selected backup file is \"$selected_backup\"." - else - # more than one backup file found, ask user to select - echo "There are more than one backup file in \"$backup_dir\"." - echo ' ' - echo "Please select file for restore:" - for ((i=0; i<$backup_count; i++)); do - echo "$i: $(basename "${backup_files[$i]}")" - done - echo - - read -rp "Enter the number of the backup to restore (0-$((backup_count - 1))): " selected_number - selected_backup=$(basename "${backup_files[$selected_number]}") - echo ' ' - echo "Selected backup file is \"$selected_backup\"." - echo ' ' - fi - - # extract backup.json from backup - tar -xvzf $backup_dir/$selected_backup -C $backup_dir --strip-components=1 "backup/backup.json" > /dev/null 2>&1 - # write js-controller versions from backup.json into array - jq_output=$(jq --arg TITLE "JS controller" -r '.objects[] | select(.value.common.title == $TITLE)' $backup_dir/backup.json) - # remove backup.json - rm $backup_dir/backup.json - - result=() - while read -r line; do - entry=$(echo "$line" | jq -r '.value.common.installedVersion') - result+=("$entry") - done <<< "$(echo "$jq_output" | jq -c '.')" - - # check for empty array - if [[ "${#result[@]}" -eq 0 ]]; then - echo "There was a problem detecting the js-controller version in the seclected backup file." - return 1 - else - # check if all found js-controller versions are equal (for multihost systems!) - first_version=${result[0]} - all_versions_equal=true - for i in "${result[@]}"; do - version=$i - if [[ "$version" != "$first_version" ]]; then - all_versions_equal=false - break - fi - done - - if [[ "$all_versions_equal" != true ]]; then - echo "Detected different js-controller versions in the selected backup file." - return 1 - fi - fi - - # compare installed js-controller version with version from backup file - echo -n "Checking js-controller versions... " - installed_version=$(iob version js-controller) - echo "Done." - echo ' ' - echo "Installed js-controller version: $installed_version" - echo "Backup js-controller version: $first_version" - echo ' ' - - if [[ "$first_version" != "$installed_version" ]]; then - echo "The installed js-controller version is different from the version in the selected backup file." - echo "If you continue, the script will use the \"--force\" option to restore your backup." - echo "Although this is normally safe with small version differences, you should know," - echo "that the recommended way is to first install the same js-controller version before restoring the backup file." - local reply - read -rp 'Do you want to continue [yes/no]? ' reply - if [[ "$reply" != y && "$reply" != Y && "$reply" != yes ]]; then - return 1 - fi - fi - - echo -n "Restoring ioBroker from \"$selected_backup\"... " - - set +e - bash iobroker restore "$selected_backup" --force > /opt/iobroker/log/restore.log 2>&1 - return_value=$? - set -e - - if [[ "$return_value" -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 "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" - echo "!!!! IMPORTANT NOTE !!!!" - echo "!!!! The maintenance script restored iobroker from a backup file. !!!!" - echo "!!!! Check /opt/iobroker/log/restore.log to see if restore was successful. !!!!" - echo "!!!! When ioBroker starts it will reinstall all Adapters automatically. !!!!" - echo "!!!! This might be take a looooong time! Please be patient! !!!!" - echo "!!!! You can view installation process by taking a look at ioBroker log. !!!!" - echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" - sleep 10 - echo "Container will be stopped or restarted in 10 seconds..." - echo "stopping" > "$healthcheck" - sleep 10 - pkill -u iobroker + echo "Due to changes in ioBroker backup structure, restoring is no longer supported by this script." + echo "Please use the original ioBroker commands or the graphical ui of backitup adapter." } # parsing commands and options