diff --git a/.github/workflows/docker_build_dev_image.yml b/.github/workflows/docker_build_dev_image.yml index fb35ade..6c4e3ea 100644 --- a/.github/workflows/docker_build_dev_image.yml +++ b/.github/workflows/docker_build_dev_image.yml @@ -42,14 +42,7 @@ jobs: chmod +x manifest-tool - name: Set up QEMU - uses: docker/setup-qemu-action@v1.2.0 - with: - image: multiarch/qemu-user-static:register - platforms: all - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v1.3.0 + run: docker run --rm --privileged multiarch/qemu-user-static:register - name: Login to DockerHub uses: docker/login-action@v1.10.0 @@ -64,62 +57,16 @@ jobs: username: ${{ secrets.PACKAGES_USER }} password: ${{ secrets.PACKAGES_PASS }} - - name: Build Docker image (amd64) - uses: docker/build-push-action@v2.6.1 - with: - context: ./amd64 - file: ./amd64/Dockerfile - push: true - platforms: linux/amd64 - tags: | - buanet/iobroker:dev-amd64, - ghcr.io/buanet/iobroker:dev-amd64 - - - name: Build Docker image (armv32v7) - uses: docker/build-push-action@v2.6.1 - with: - context: ./arm32v7 - file: ./arm32v7/Dockerfile - push: true - platforms: linux/arm/v7 - tags: | - buanet/iobroker:dev-arm32v7, - ghcr.io/buanet/iobroker:dev-arm32v7 - - - name: Build Docker image (arm64v8) - uses: docker/build-push-action@v2.6.1 - with: - context: ./arm64v8 - file: ./arm64v8/Dockerfile - push: true - platforms: linux/arm64 - tags: | - buanet/iobroker:dev-arm64v8, - ghcr.io/buanet/iobroker:dev-arm64v8 - - - name: Create and push manifests + - name: Build an push Docker image (amd64) run: | - sed -e "s/\${VERSION}/dev/g" -e "s/\${DOCKERTAG}/dev/g" ./manifest.yml > manifest_dev.yaml - ./manifest-tool --username ${{ secrets.DOCKER_USER }} --password ${{ secrets.DOCKER_PASS }} push from-spec manifest_dev.yaml - sed -e "s/\${VERSION}/dev/g" -e "s/\${DOCKERTAG}/dev/g" ./manifest_ghcr.yml > manifest_ghcr_dev.yaml - ./manifest-tool --username ${{ secrets.PACKAGES_USER }} --password ${{ secrets.PACKAGES_PASS }} push from-spec manifest_ghcr_dev.yaml + echo "Building amd64..." + sed -i "s/\${VERSION}/devbuild/g" ./amd64/scripts/iobroker_startup.sh + docker build -t "buanet/iobroker:dev-amd64" ./amd64 + docker tag "buanet/iobroker:dev-amd64" "iobroker/iobroker:dev-amd64" + echo "Done." + echo '' + echo "Pushing images to buanet/iobroker..." + docker push "buanet/iobroker:dev-amd64" + echo "Done." + echo '' - - name: Delete untagged images from GitHub packages - uses: actions/github-script@v3 - 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