mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-25 06:05:32 +02:00
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v3.2.0...v3.3.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>
101 lines
4.1 KiB
YAML
101 lines
4.1 KiB
YAML
# Github action to build Docker image from main branch for iobroker/iobroker (tag: latest)
|
|
name: Build debian latest (iobroker)
|
|
|
|
on:
|
|
release:
|
|
types:
|
|
- released
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-latest-image:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Fetching 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@v3
|
|
with:
|
|
repository: 'buanet/ioBroker.docker'
|
|
ref: ${{ env.RELEASE_TAG }}
|
|
|
|
- name: Fetching and adding version tag and date
|
|
id: version
|
|
run: |
|
|
VERSION="$(cat .VERSION)"
|
|
MAJORVERSION="$(cat .VERSION | cut -c 1-2 | sed -r 's#^(.{0})#\1latest-#')"
|
|
DATI="$(date --rfc-3339=seconds | sed 's/ /T/')"
|
|
echo "This is the Version: $VERSION"
|
|
echo "version=$VERSION" >> $GITHUB_ENV
|
|
echo "This is the Major Version: $MAJORVERSION"
|
|
echo "majorversion=$MAJORVERSION" >> $GITHUB_ENV
|
|
echo "This is the Buildnumber/Timestamp: $DATI"
|
|
echo "dati=$DATI" >> $GITHUB_ENV
|
|
# startup script
|
|
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
|
|
|
|
- name: Set up manifest tool
|
|
run: |
|
|
wget https://github.com/estesp/manifest-tool/releases/download/v1.0.3/manifest-tool-linux-amd64 -O manifest-tool
|
|
chmod +x manifest-tool
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2.1.0
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v2.2.1
|
|
|
|
- name: Login to DockerHub (iobroker)
|
|
uses: docker/login-action@v2.1.0
|
|
with:
|
|
username: ${{ secrets.DOCKER_USER_IOB }}
|
|
password: ${{ secrets.DOCKER_PASS_IOB }}
|
|
|
|
- name: Build Docker image (amd64)
|
|
uses: docker/build-push-action@v3.3.0
|
|
with:
|
|
context: ./debian
|
|
file: ./debian/node16/Dockerfile
|
|
push: true
|
|
platforms: linux/amd64
|
|
tags: |
|
|
iobroker/iobroker:${{ env.version }}-amd64,
|
|
|
|
- name: Build Docker image (arm32v7)
|
|
uses: docker/build-push-action@v3.3.0
|
|
with:
|
|
context: ./debian
|
|
file: ./debian/node16/Dockerfile
|
|
push: true
|
|
platforms: linux/arm/v7
|
|
tags: |
|
|
iobroker/iobroker:${{ env.version }}-arm32v7,
|
|
|
|
- name: Build Docker image (arm64v8)
|
|
uses: docker/build-push-action@v3.3.0
|
|
with:
|
|
context: ./debian
|
|
file: ./debian/node16/Dockerfile
|
|
push: true
|
|
platforms: linux/arm64/v8
|
|
tags: |
|
|
iobroker/iobroker:${{ env.version }}-arm64v8,
|
|
|
|
- name: Create and push manifests (iobroker)
|
|
run: |
|
|
sed -e "s/\${VERSION}/${{ env.version }}/g" -e "s/\${DOCKERTAG}/latest/g" ./manifest_iob.yml > manifest_latest_iob.yaml
|
|
./manifest-tool --username ${{ secrets.DOCKER_USER_IOB }} --password ${{ secrets.DOCKER_PASS_IOB }} push from-spec manifest_latest_iob.yaml
|
|
sed -e "s/\${VERSION}/${{ env.version }}/g" -e "s/\${DOCKERTAG}/${{ env.majorversion }}/g" ./manifest_iob.yml > manifest_majorversion_iob.yaml
|
|
./manifest-tool --username ${{ secrets.DOCKER_USER_IOB }} --password ${{ secrets.DOCKER_PASS_IOB }} push from-spec manifest_majorversion_iob.yaml
|
|
sed -e "s/\${VERSION}/${{ env.version }}/g" -e "s/\${DOCKERTAG}/${{ env.version }}/g" ./manifest_iob.yml > manifest_version_iob.yaml
|
|
./manifest-tool --username ${{ secrets.DOCKER_USER_IOB }} --password ${{ secrets.DOCKER_PASS_IOB }} push from-spec manifest_version_iob.yaml
|