mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-17 10:29:00 +02:00
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.12.0 to 6.15.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6.12.0...v6.15.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
145 lines
5.7 KiB
YAML
145 lines
5.7 KiB
YAML
# 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.3.0
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v3.8.0
|
|
|
|
- name: Login to DockerHub
|
|
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.15.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.3.0
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v3.8.0
|
|
|
|
- name: Login to DockerHub
|
|
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.15.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 }}
|