test multiarch build

This commit is contained in:
buanet
2023-01-26 20:46:45 +01:00
parent d500b0a014
commit 445356cdc2

View File

@@ -33,13 +33,13 @@ jobs:
sed -e "s/\${VERSION}/$VERSION-dev/" -e "s/\${DATI}/$DATI/" ./debian/node16/Dockerfile > ./debian/node16/Dockerfile.tmp sed -e "s/\${VERSION}/$VERSION-dev/" -e "s/\${DATI}/$DATI/" ./debian/node16/Dockerfile > ./debian/node16/Dockerfile.tmp
mv -f ./debian/node16/Dockerfile.tmp ./debian/node16/Dockerfile mv -f ./debian/node16/Dockerfile.tmp ./debian/node16/Dockerfile
- name: Set up manifest tool # - name: Set up manifest tool
run: | # run: |
git clone https://github.com/estesp/manifest-tool # git clone https://github.com/estesp/manifest-tool
cd manifest-tool && make binary # cd manifest-tool && make binary
# wget https://github.com/estesp/manifest-tool/releases/download/v1.0.3/manifest-tool-linux-amd64 -O manifest-tool # # wget https://github.com/estesp/manifest-tool/releases/download/v1.0.3/manifest-tool-linux-amd64 -O manifest-tool
chmod +x manifest-tool # chmod +x manifest-tool
cd .. # cd ..
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v2.1.0 uses: docker/setup-qemu-action@v2.1.0
@@ -61,45 +61,56 @@ jobs:
username: ${{ secrets.PACKAGES_USER }} username: ${{ secrets.PACKAGES_USER }}
password: ${{ secrets.PACKAGES_PASS }} password: ${{ secrets.PACKAGES_PASS }}
- name: Build Docker image (amd64) - name: Build Docker image
uses: docker/build-push-action@v3.3.0 uses: docker/build-push-action@v3.3.0
with: with:
context: ./debian context: ./debian
file: ./debian/node16/Dockerfile file: ./debian/node16/Dockerfile
push: true push: true
platforms: linux/amd64 platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
tags: | tags: |
buanet/iobroker:dev-amd64, buanet/iobroker:dev
ghcr.io/buanet/iobroker:dev-amd64 ghcr.io/buanet/iobroker:dev
- name: Build Docker image (arm32v7) # - name: Build Docker image (amd64)
uses: docker/build-push-action@v3.3.0 # uses: docker/build-push-action@v3.3.0
with: # with:
context: ./debian # context: ./debian
file: ./debian/node16/Dockerfile # file: ./debian/node16/Dockerfile
push: true # push: true
platforms: linux/arm/v7 # platforms: linux/amd64
tags: | # tags: |
buanet/iobroker:dev-arm32v7, # buanet/iobroker:dev-amd64,
ghcr.io/buanet/iobroker:dev-arm32v7 # ghcr.io/buanet/iobroker:dev-amd64
- name: Build Docker image (arm64v8) # - name: Build Docker image (arm32v7)
uses: docker/build-push-action@v3.3.0 # uses: docker/build-push-action@v3.3.0
with: # with:
context: ./debian # context: ./debian
file: ./debian/node16/Dockerfile # file: ./debian/node16/Dockerfile
push: true # push: true
platforms: linux/arm64/v8 # platforms: linux/arm/v7
tags: | # tags: |
buanet/iobroker:dev-arm64v8, # buanet/iobroker:dev-arm32v7,
ghcr.io/buanet/iobroker:dev-arm64v8 # ghcr.io/buanet/iobroker:dev-arm32v7
- name: Create and push manifests # - name: Build Docker image (arm64v8)
run: | # uses: docker/build-push-action@v3.3.0
sed -e "s/\${VERSION}/dev/g" -e "s/\${DOCKERTAG}/dev/g" ./manifest.yml > manifest_dev.yaml # with:
./manifest-tool/manifest-tool --username ${{ secrets.DOCKER_USER }} --password ${{ secrets.DOCKER_PASS }} push from-spec manifest_dev.yaml # context: ./debian
sed -e "s/\${VERSION}/dev/g" -e "s/\${DOCKERTAG}/dev/g" ./manifest_ghcr.yml > manifest_ghcr_dev.yaml # file: ./debian/node16/Dockerfile
./manifest-tool/manifest-tool --username ${{ secrets.PACKAGES_USER }} --password ${{ secrets.PACKAGES_PASS }} push from-spec manifest_ghcr_dev.yaml # push: true
# platforms: linux/arm64/v8
# tags: |
# buanet/iobroker:dev-arm64v8,
# ghcr.io/buanet/iobroker:dev-arm64v8
# - name: Create and push manifests
# run: |
# sed -e "s/\${VERSION}/dev/g" -e "s/\${DOCKERTAG}/dev/g" ./manifest.yml > manifest_dev.yaml
# ./manifest-tool/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/manifest-tool --username ${{ secrets.PACKAGES_USER }} --password ${{ secrets.PACKAGES_PASS }} push from-spec manifest_ghcr_dev.yaml
- name: Delete untagged images from GitHub packages - name: Delete untagged images from GitHub packages
uses: actions/github-script@v6 uses: actions/github-script@v6