mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-17 18:39:01 +02:00
add dev build
This commit is contained in:
233
.github/workflows/build-debian12-dev_sep.yml
vendored
Normal file
233
.github/workflows/build-debian12-dev_sep.yml
vendored
Normal file
@@ -0,0 +1,233 @@
|
|||||||
|
# Github action to build Debian12 image (Tag: dev)
|
||||||
|
name: Build Debian 12 Image (dev)
|
||||||
|
|
||||||
|
on:
|
||||||
|
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/checkout@v4.1.7
|
||||||
|
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 "::set-output name=build_number::$BUILD"
|
||||||
|
echo "[LOG] Buildnumber: $BUILD"
|
||||||
|
|
||||||
|
build-dev-armv7-recommended-node:
|
||||||
|
name: Build dev armv7 image with recommended node version for buanet
|
||||||
|
needs: [create-build-number]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v4.1.7
|
||||||
|
with:
|
||||||
|
repository: 'buanet/ioBroker.docker'
|
||||||
|
|
||||||
|
- name: Set job variables
|
||||||
|
run: |
|
||||||
|
VERSION="$(cat .VERSION)-dev"
|
||||||
|
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-dev/" -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-dev/" -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-dev-arm64v8-recommended-node:
|
||||||
|
name: Build latest armv64v8 image with recommended node version for buanet
|
||||||
|
needs: [create-build-number]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v4.1.7
|
||||||
|
with:
|
||||||
|
repository: 'buanet/ioBroker.docker'
|
||||||
|
|
||||||
|
- name: Set job variables
|
||||||
|
run: |
|
||||||
|
VERSION="$(cat .VERSION)-dev"
|
||||||
|
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-dev/" -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-dev/" -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-dev-amd64-recommended-node:
|
||||||
|
name: Build latest amd64 image with recommended node version for buanet
|
||||||
|
needs: [create-build-number]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v4.1.7
|
||||||
|
with:
|
||||||
|
repository: 'buanet/ioBroker.docker'
|
||||||
|
|
||||||
|
- name: Set job variables
|
||||||
|
run: |
|
||||||
|
VERSION="$(cat .VERSION)-dev"
|
||||||
|
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-dev/" -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-dev/" -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:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [build-dev-armv7-recommended-node, build-dev-arm64v8-recommended-node, build-dev-amd64-recommended-node, create-build-number]
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v4.1.7
|
||||||
|
with:
|
||||||
|
repository: 'buanet/ioBroker.docker'
|
||||||
|
|
||||||
|
- 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:dev 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:dev 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
|
||||||
Reference in New Issue
Block a user