Docker build #158
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker build | |
on: | |
push: | |
branches: [main] | |
schedule: | |
- cron: '0 0 */2 * *' | |
jobs: | |
arm64v8: | |
name: Build for arm64v8 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@27d0a4f181a40b142cce983c5393082c365d1480 # Pin 1.2.0 | |
with: | |
image: tonistiigi/binfmt:latest | |
platforms: arm64 | |
- name: Set up buildx | |
uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25 # Pin 1.6.0 | |
with: | |
install: true | |
- name: Login to DockerHub | |
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # Pin 1.14.1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build | |
run: cd arm64v8-debian-11 && docker buildx build --platform linux/arm64 . -t weilbyte/box:arm64v8-debian-11 --push | |
armv7: | |
name: Build for armv7 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@27d0a4f181a40b142cce983c5393082c365d1480 | |
with: | |
image: tonistiigi/binfmt:latest | |
platforms: arm | |
- name: Set up buildx | |
uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25 # Pin 1.6.0 | |
with: | |
install: true | |
- name: Login to DockerHub | |
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # Pin 1.14.1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build | |
run: cd armv7-debian-11 && docker buildx build --platform linux/arm/v7 . -t weilbyte/box:armv7-debian-11 --push | |
manifests: | |
name: Update manifests | |
runs-on: ubuntu-latest | |
needs: [armv7, arm64v8] | |
steps: | |
- name: Set up buildx | |
uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25 # Pin 1.6.0 | |
with: | |
install: true | |
- name: Login to DockerHub | |
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # Pin 1.14.1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Update manifests | |
run: | | |
docker buildx imagetools create weilbyte/box:armv7-debian-11 weilbyte/box:arm64v8-debian-11 --tag weilbyte/box:debian-11 && \ | |
docker buildx imagetools create weilbyte/box:debian-11 --tag weilbyte/box:latest | |