mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-17 18:39:01 +02:00
delete old workflows
This commit is contained in:
@@ -1,97 +0,0 @@
|
|||||||
# Github action to build Docker image from beta branch (tag: beta)
|
|
||||||
name: Build debian beta-node20
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [prereleased]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-beta-node20-image:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Fetching latest prerelease tag
|
|
||||||
run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4.1.0
|
|
||||||
with:
|
|
||||||
repository: 'buanet/ioBroker.docker'
|
|
||||||
ref: ${{ env.RELEASE_TAG }}
|
|
||||||
|
|
||||||
- name: Fetching 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/node20/Dockerfile > ./debian/node20/Dockerfile.tmp
|
|
||||||
mv -f ./debian/node20/Dockerfile.tmp ./debian/node20/Dockerfile
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3.0.0
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
id: buildx
|
|
||||||
uses: docker/setup-buildx-action@v3.0.0
|
|
||||||
|
|
||||||
- name: Login to DockerHub
|
|
||||||
uses: docker/login-action@v3.0.0
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
|
||||||
password: ${{ secrets.DOCKER_PASS }}
|
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
|
||||||
uses: docker/login-action@v3.0.0
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ secrets.PACKAGES_USER }}
|
|
||||||
password: ${{ secrets.PACKAGES_PASS }}
|
|
||||||
|
|
||||||
- name: Build Docker image (node20)
|
|
||||||
uses: docker/build-push-action@v5.0.0
|
|
||||||
with:
|
|
||||||
context: ./debian
|
|
||||||
file: ./debian/node20/Dockerfile
|
|
||||||
push: true
|
|
||||||
platforms: |
|
|
||||||
linux/amd64
|
|
||||||
linux/arm/v7
|
|
||||||
linux/arm64/v8
|
|
||||||
tags: |
|
|
||||||
buanet/iobroker:beta-node20,
|
|
||||||
buanet/iobroker:${{ env.version }}-node20,
|
|
||||||
ghcr.io/buanet/iobroker:beta-node20,
|
|
||||||
ghcr.io/buanet/iobroker:${{ env.version }}-node20
|
|
||||||
provenance: false
|
|
||||||
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net)
|
|
||||||
|
|
||||||
- name: Delete untagged images from GitHub packages
|
|
||||||
uses: actions/github-script@v6
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.PACKAGES_PASS }}
|
|
||||||
script: |
|
|
||||||
const response = await github.request("GET /users/${{ env.OWNER }}/packages/container/${{ env.PACKAGE_NAME }}/versions",
|
|
||||||
{ per_page: ${{ env.PER_PAGE }}
|
|
||||||
});
|
|
||||||
for(version of response.data) {
|
|
||||||
if (version.metadata.container.tags.length == 0) {
|
|
||||||
console.log("delete " + version.id)
|
|
||||||
const deleteResponse = await github.request("DELETE /user/packages/container/${{ env.PACKAGE_NAME }}/versions/" + version.id, { });
|
|
||||||
console.log("status " + deleteResponse.status)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
env:
|
|
||||||
OWNER: buanet
|
|
||||||
PACKAGE_NAME: iobroker
|
|
||||||
PER_PAGE: 100
|
|
||||||
97
.github/workflows/build-debian-image-beta.yml
vendored
97
.github/workflows/build-debian-image-beta.yml
vendored
@@ -1,97 +0,0 @@
|
|||||||
# Github action to build Docker image from beta branch (tag: beta)
|
|
||||||
name: Build debian beta
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [prereleased]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-beta-image:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Fetching latest prerelease tag
|
|
||||||
run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4.1.0
|
|
||||||
with:
|
|
||||||
repository: 'buanet/ioBroker.docker'
|
|
||||||
ref: ${{ env.RELEASE_TAG }}
|
|
||||||
|
|
||||||
- name: Fetching 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/node18/Dockerfile > ./debian/node18/Dockerfile.tmp
|
|
||||||
mv -f ./debian/node18/Dockerfile.tmp ./debian/node18/Dockerfile
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3.0.0
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
id: buildx
|
|
||||||
uses: docker/setup-buildx-action@v3.0.0
|
|
||||||
|
|
||||||
- name: Login to DockerHub
|
|
||||||
uses: docker/login-action@v3.0.0
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
|
||||||
password: ${{ secrets.DOCKER_PASS }}
|
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
|
||||||
uses: docker/login-action@v3.0.0
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ secrets.PACKAGES_USER }}
|
|
||||||
password: ${{ secrets.PACKAGES_PASS }}
|
|
||||||
|
|
||||||
- name: Build Docker image
|
|
||||||
uses: docker/build-push-action@v5.0.0
|
|
||||||
with:
|
|
||||||
context: ./debian
|
|
||||||
file: ./debian/node18/Dockerfile
|
|
||||||
push: true
|
|
||||||
platforms: |
|
|
||||||
linux/amd64
|
|
||||||
linux/arm/v7
|
|
||||||
linux/arm64/v8
|
|
||||||
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)
|
|
||||||
|
|
||||||
- name: Delete untagged images from GitHub packages
|
|
||||||
uses: actions/github-script@v6
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.PACKAGES_PASS }}
|
|
||||||
script: |
|
|
||||||
const response = await github.request("GET /users/${{ env.OWNER }}/packages/container/${{ env.PACKAGE_NAME }}/versions",
|
|
||||||
{ per_page: ${{ env.PER_PAGE }}
|
|
||||||
});
|
|
||||||
for(version of response.data) {
|
|
||||||
if (version.metadata.container.tags.length == 0) {
|
|
||||||
console.log("delete " + version.id)
|
|
||||||
const deleteResponse = await github.request("DELETE /user/packages/container/${{ env.PACKAGE_NAME }}/versions/" + version.id, { });
|
|
||||||
console.log("status " + deleteResponse.status)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
env:
|
|
||||||
OWNER: buanet
|
|
||||||
PACKAGE_NAME: iobroker
|
|
||||||
PER_PAGE: 100
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
# Github action to build Docker image from dev branch (tag: dev)
|
|
||||||
name: Build debian dev-node20
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-dev-node20-image:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4.1.0
|
|
||||||
with:
|
|
||||||
repository: 'buanet/ioBroker.docker'
|
|
||||||
|
|
||||||
- name: Fetch 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-dev/" -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-dev/" -e "s/\${DATI}/$DATI/" ./debian/node20/Dockerfile > ./debian/node20/Dockerfile.tmp
|
|
||||||
mv -f ./debian/node20/Dockerfile.tmp ./debian/node20/Dockerfile
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3.0.0
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
id: buildx
|
|
||||||
uses: docker/setup-buildx-action@v3.0.0
|
|
||||||
|
|
||||||
- name: Login to DockerHub
|
|
||||||
uses: docker/login-action@v3.0.0
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
|
||||||
password: ${{ secrets.DOCKER_PASS }}
|
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
|
||||||
uses: docker/login-action@v3.0.0
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ secrets.PACKAGES_USER }}
|
|
||||||
password: ${{ secrets.PACKAGES_PASS }}
|
|
||||||
|
|
||||||
- name: Build Docker image (node20)
|
|
||||||
uses: docker/build-push-action@v5.0.0
|
|
||||||
with:
|
|
||||||
context: ./debian
|
|
||||||
file: ./debian/node20/Dockerfile
|
|
||||||
push: true
|
|
||||||
platforms: |
|
|
||||||
linux/amd64
|
|
||||||
linux/arm/v7
|
|
||||||
linux/arm64/v8
|
|
||||||
tags: |
|
|
||||||
buanet/iobroker:dev-node20,
|
|
||||||
ghcr.io/buanet/iobroker:dev-node20
|
|
||||||
provenance: false
|
|
||||||
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net)
|
|
||||||
|
|
||||||
- name: Delete untagged images from GitHub Container Registry
|
|
||||||
uses: actions/github-script@v6.4.1
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.PACKAGES_PASS }}
|
|
||||||
script: |
|
|
||||||
const response = await github.request("GET /users/${{ env.OWNER }}/packages/container/${{ env.PACKAGE_NAME }}/versions",
|
|
||||||
{ per_page: ${{ env.PER_PAGE }}
|
|
||||||
});
|
|
||||||
for(version of response.data) {
|
|
||||||
if (version.metadata.container.tags.length == 0) {
|
|
||||||
console.log("delete " + version.id)
|
|
||||||
const deleteResponse = await github.request("DELETE /user/packages/container/${{ env.PACKAGE_NAME }}/versions/" + version.id, { });
|
|
||||||
console.log("status " + deleteResponse.status)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
env:
|
|
||||||
OWNER: buanet
|
|
||||||
PACKAGE_NAME: iobroker
|
|
||||||
PER_PAGE: 100
|
|
||||||
89
.github/workflows/build-debian-image-dev.yml
vendored
89
.github/workflows/build-debian-image-dev.yml
vendored
@@ -1,89 +0,0 @@
|
|||||||
# Github action to build Docker image from dev branch (tag: dev)
|
|
||||||
name: Build debian dev
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-dev-image:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4.1.0
|
|
||||||
with:
|
|
||||||
repository: 'buanet/ioBroker.docker'
|
|
||||||
|
|
||||||
- name: Fetch 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-dev/" -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-dev/" -e "s/\${DATI}/$DATI/" ./debian/node18/Dockerfile > ./debian/node18/Dockerfile.tmp
|
|
||||||
mv -f ./debian/node18/Dockerfile.tmp ./debian/node18/Dockerfile
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3.0.0
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
id: buildx
|
|
||||||
uses: docker/setup-buildx-action@v3.0.0
|
|
||||||
|
|
||||||
- name: Login to DockerHub
|
|
||||||
uses: docker/login-action@v3.0.0
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
|
||||||
password: ${{ secrets.DOCKER_PASS }}
|
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
|
||||||
uses: docker/login-action@v3.0.0
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ secrets.PACKAGES_USER }}
|
|
||||||
password: ${{ secrets.PACKAGES_PASS }}
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
|
||||||
uses: docker/build-push-action@v5.0.0
|
|
||||||
with:
|
|
||||||
context: ./debian
|
|
||||||
file: ./debian/node18/Dockerfile
|
|
||||||
push: true
|
|
||||||
platforms: |
|
|
||||||
linux/amd64
|
|
||||||
linux/arm/v7
|
|
||||||
linux/arm64/v8
|
|
||||||
tags: |
|
|
||||||
buanet/iobroker:dev,
|
|
||||||
ghcr.io/buanet/iobroker:dev
|
|
||||||
provenance: false
|
|
||||||
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Official Docker image for ioBroker smarthome software (https://www.iobroker.net)
|
|
||||||
|
|
||||||
- name: Delete untagged images from GitHub Container Registry
|
|
||||||
uses: actions/github-script@v6.4.1
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.PACKAGES_PASS }}
|
|
||||||
script: |
|
|
||||||
const response = await github.request("GET /users/${{ env.OWNER }}/packages/container/${{ env.PACKAGE_NAME }}/versions",
|
|
||||||
{ per_page: ${{ env.PER_PAGE }}
|
|
||||||
});
|
|
||||||
for(version of response.data) {
|
|
||||||
if (version.metadata.container.tags.length == 0) {
|
|
||||||
console.log("delete " + version.id)
|
|
||||||
const deleteResponse = await github.request("DELETE /user/packages/container/${{ env.PACKAGE_NAME }}/versions/" + version.id, { });
|
|
||||||
console.log("status " + deleteResponse.status)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
env:
|
|
||||||
OWNER: buanet
|
|
||||||
PACKAGE_NAME: iobroker
|
|
||||||
PER_PAGE: 100
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
# 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@v4.1.0
|
|
||||||
with:
|
|
||||||
repository: 'buanet/ioBroker.docker'
|
|
||||||
ref: ${{ env.RELEASE_TAG }}
|
|
||||||
|
|
||||||
- name: Fetching 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/node18/Dockerfile > ./debian/node18/Dockerfile.tmp
|
|
||||||
mv -f ./debian/node18/Dockerfile.tmp ./debian/node18/Dockerfile
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3.0.0
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
id: buildx
|
|
||||||
uses: docker/setup-buildx-action@v3.0.0
|
|
||||||
|
|
||||||
- name: Login to DockerHub (iobroker)
|
|
||||||
uses: docker/login-action@v3.0.0
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USER_IOB }}
|
|
||||||
password: ${{ secrets.DOCKER_PASS_IOB }}
|
|
||||||
|
|
||||||
- name: Build Docker image
|
|
||||||
uses: docker/build-push-action@v5.0.0
|
|
||||||
with:
|
|
||||||
context: ./debian
|
|
||||||
file: ./debian/node18/Dockerfile
|
|
||||||
push: true
|
|
||||||
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
|
|
||||||
tags: |
|
|
||||||
iobroker/iobroker:latest,
|
|
||||||
iobroker/iobroker:${{ env.majorversion }},
|
|
||||||
iobroker/iobroker:${{ env.version }}
|
|
||||||
|
|
||||||
97
.github/workflows/build-debian-image-latest.yml
vendored
97
.github/workflows/build-debian-image-latest.yml
vendored
@@ -1,97 +0,0 @@
|
|||||||
# Github action to build Docker image from main branch (tag: latest)
|
|
||||||
name: Build debian latest (buanet)
|
|
||||||
|
|
||||||
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@v4.1.0
|
|
||||||
with:
|
|
||||||
repository: 'buanet/ioBroker.docker'
|
|
||||||
ref: ${{ env.RELEASE_TAG }}
|
|
||||||
|
|
||||||
- name: Fetching 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/node18/Dockerfile > ./debian/node18/Dockerfile.tmp
|
|
||||||
mv -f ./debian/node18/Dockerfile.tmp ./debian/node18/Dockerfile
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3.0.0
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
id: buildx
|
|
||||||
uses: docker/setup-buildx-action@v3.0.0
|
|
||||||
- name: Login to DockerHub (buanet)
|
|
||||||
uses: docker/login-action@v3.0.0
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
|
||||||
password: ${{ secrets.DOCKER_PASS }}
|
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
|
||||||
uses: docker/login-action@v3.0.0
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ secrets.PACKAGES_USER }}
|
|
||||||
password: ${{ secrets.PACKAGES_PASS }}
|
|
||||||
|
|
||||||
- name: Build Docker image
|
|
||||||
uses: docker/build-push-action@v5.0.0
|
|
||||||
with:
|
|
||||||
context: ./debian
|
|
||||||
file: ./debian/node18/Dockerfile
|
|
||||||
#provenance: false
|
|
||||||
push: true
|
|
||||||
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
|
|
||||||
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 }}
|
|
||||||
|
|
||||||
- name: Delete untagged images from GitHub packages
|
|
||||||
uses: actions/github-script@v6
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.PACKAGES_PASS }}
|
|
||||||
script: |
|
|
||||||
const response = await github.request("GET /users/${{ env.OWNER }}/packages/container/${{ env.PACKAGE_NAME }}/versions",
|
|
||||||
{ per_page: ${{ env.PER_PAGE }}
|
|
||||||
});
|
|
||||||
for(version of response.data) {
|
|
||||||
if (version.metadata.container.tags.length == 0) {
|
|
||||||
console.log("delete " + version.id)
|
|
||||||
const deleteResponse = await github.request("DELETE /user/packages/container/${{ env.PACKAGE_NAME }}/versions/" + version.id, { });
|
|
||||||
console.log("status " + deleteResponse.status)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
env:
|
|
||||||
OWNER: buanet
|
|
||||||
PACKAGE_NAME: iobroker
|
|
||||||
PER_PAGE: 100
|
|
||||||
Reference in New Issue
Block a user