Build Debian 12 Image (latest) #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Github action to build Debian12 image (Tag: latest) | |
name: Build Debian 12 Image (latest) | |
on: | |
release: | |
types: [released] | |
workflow_dispatch: | |
jobs: | |
create-build-number: | |
runs-on: ubuntu-latest | |
outputs: | |
build_number: ${{ steps.generate-build-number.outputs.build_number }} | |
steps: | |
- name: Checkout repo | |
uses: actions/[email protected] | |
with: | |
repository: 'buanet/ioBroker.docker' | |
token: ${{ secrets.ACTIONS_PAT }} | |
- name: Generate build number | |
id: generate-build-number | |
run: | | |
BUILD="$(date +"%Y%m%d.%H%M%S")" | |
echo "$BUILD" > .github/dependencies/.latest-build | |
echo "::set-output name=build_number::$BUILD" | |
echo "[LOG] Buildnumber: $BUILD" | |
- name: Commit latest release version | |
run: | | |
git config --global user.name 'buanet' | |
git config --global user.email '[email protected]' | |
git commit -am "new build" | |
git push | |
build-latest-armv7-for-buanet: | |
name: Build latest armv7 image for buanet | |
needs: [create-build-number] | |
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/[email protected] | |
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-#')" | |
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] Major Image Version: $MAJORVERSION" | |
echo "majorversion=$MAJORVERSION" >> $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/[email protected] | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/[email protected] | |
- name: Login to DockerHub (buanet) | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_PASS }} | |
- name: Login to GitHub Container Registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ secrets.PACKAGES_USER }} | |
password: ${{ secrets.PACKAGES_PASS }} | |
- name: Build and push Docker image | |
uses: docker/[email protected] | |
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-latest-arm64v8-for-buanet: | |
name: Build latest armv64v8 image for buanet | |
needs: [create-build-number] | |
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/[email protected] | |
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-#')" | |
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] Major Image Version: $MAJORVERSION" | |
echo "majorversion=$MAJORVERSION" >> $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/[email protected] | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/[email protected] | |
- name: Login to DockerHub (buanet) | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_PASS }} | |
- name: Login to GitHub Container Registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ secrets.PACKAGES_USER }} | |
password: ${{ secrets.PACKAGES_PASS }} | |
- name: Build and push Docker image | |
uses: docker/[email protected] | |
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-latest-amd64-for-buanet: | |
name: Build latest amd64 image for buanet | |
needs: [create-build-number] | |
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/[email protected] | |
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-#')" | |
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] Major Image Version: $MAJORVERSION" | |
echo "majorversion=$MAJORVERSION" >> $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/[email protected] | |
- name: Login to DockerHub (buanet) | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_PASS }} | |
- name: Login to GitHub Container Registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ secrets.PACKAGES_USER }} | |
password: ${{ secrets.PACKAGES_PASS }} | |
- name: Build and push Docker image | |
uses: docker/[email protected] | |
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-for-buanet: | |
runs-on: ubuntu-latest | |
needs: [build-latest-armv7-for-buanet, build-latest-arm64v8-for-buanet, build-latest-amd64-for-buanet, create-build-number] | |
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/[email protected] | |
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-#')" | |
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] Major Image Version: $MAJORVERSION" | |
echo "majorversion=$MAJORVERSION" >> $GITHUB_ENV | |
echo "[LOG] Buildnumber: $BUILD" | |
echo "build=$BUILD" >> $GITHUB_ENV | |
- name: Login to DockerHub (buanet) | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_PASS }} | |
- name: Login to GitHub Container Registry | |
uses: docker/[email protected] | |
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:latest 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:latest 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.majorversion }} 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.majorversion }} 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 | |
build-latest-armv7-for-iobroker: | |
name: Build latest armv7 image for iobroker | |
needs: [create-build-number] | |
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/[email protected] | |
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-#')" | |
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] Major Image Version: $MAJORVERSION" | |
echo "majorversion=$MAJORVERSION" >> $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/[email protected] | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/[email protected] | |
- name: Login to DockerHub (iobroker) | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKER_USER_IOB }} | |
password: ${{ secrets.DOCKER_PASS_IOB }} | |
- name: Build and push Docker image | |
uses: docker/[email protected] | |
with: | |
context: ./debian12 | |
file: ./debian12/Dockerfile | |
push: true | |
platforms: linux/arm/v7 | |
tags: iobroker/iobroker:${{ env.version }}-build.${{ env.build }}-armv7 | |
build-latest-arm64v8-for-iobroker: | |
name: Build latest armv64v8 image for iobroker | |
needs: [create-build-number] | |
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/[email protected] | |
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-#')" | |
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] Major Image Version: $MAJORVERSION" | |
echo "majorversion=$MAJORVERSION" >> $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/[email protected] | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/[email protected] | |
- name: Login to DockerHub (iobroker) | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKER_USER_IOB }} | |
password: ${{ secrets.DOCKER_PASS_IOB }} | |
- name: Build and push Docker image | |
uses: docker/[email protected] | |
with: | |
context: ./debian12 | |
file: ./debian12/Dockerfile | |
push: true | |
platforms: linux/arm64/v8 | |
tags: iobroker/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8 | |
build-latest-amd64-for-iobroker: | |
name: Build latest amd64 image for iobroker | |
needs: [create-build-number] | |
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/[email protected] | |
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-#')" | |
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] Major Image Version: $MAJORVERSION" | |
echo "majorversion=$MAJORVERSION" >> $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/[email protected] | |
- name: Login to DockerHub (iobroker) | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKER_USER_IOB }} | |
password: ${{ secrets.DOCKER_PASS_IOB }} | |
- name: Build and push Docker image | |
uses: docker/[email protected] | |
with: | |
context: ./debian12 | |
file: ./debian12/Dockerfile | |
push: true | |
platforms: linux/amd64 | |
tags: iobroker/iobroker:${{ env.version }}-build.${{ env.build }}-amd64 | |
create-multiarch-image-for-iobroker: | |
runs-on: ubuntu-latest | |
needs: [build-latest-armv7-for-iobroker, build-latest-arm64v8-for-iobroker, build-latest-amd64-for-iobroker, create-build-number] | |
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/[email protected] | |
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-#')" | |
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] Major Image Version: $MAJORVERSION" | |
echo "majorversion=$MAJORVERSION" >> $GITHUB_ENV | |
echo "[LOG] Buildnumber: $BUILD" | |
echo "build=$BUILD" >> $GITHUB_ENV | |
- name: Login to DockerHub (iobroker) | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKER_USER_IOB }} | |
password: ${{ secrets.DOCKER_PASS_IOB }} | |
- name: Create and push multi-platform image | |
run: | | |
docker buildx imagetools create -t iobroker/iobroker:latest iobroker/iobroker:${{ env.version }}-build.${{ env.build }}-armv7 iobroker/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8 iobroker/iobroker:${{ env.version }}-build.${{ env.build }}-amd64 | |
docker buildx imagetools create -t iobroker/iobroker:${{ env.majorversion }} iobroker/iobroker:${{ env.version }}-build.${{ env.build }}-armv7 iobroker/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8 iobroker/iobroker:${{ env.version }}-build.${{ env.build }}-amd64 | |
docker buildx imagetools create -t iobroker/iobroker:${{ env.version }} iobroker/iobroker:${{ env.version }}-build.${{ env.build }}-armv7 iobroker/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8 iobroker/iobroker:${{ env.version }}-build.${{ env.build }}-amd64 | |
docker buildx imagetools create -t iobroker/iobroker:${{ env.version }}-build.${{ env.build }} iobroker/iobroker:${{ env.version }}-build.${{ env.build }}-armv7 iobroker/iobroker:${{ env.version }}-build.${{ env.build }}-arm64v8 iobroker/iobroker:${{ env.version }}-build.${{ env.build }}-amd64 |