Docker CI #87
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 CI | |
on: | |
push: | |
branches: | |
- "main" | |
schedule: | |
# ┌───────────── minute (0 - 59) | |
# │ ┌───────────── hour (0 - 23) | |
# │ │ ┌───────────── day of the month (1 - 31) | |
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) | |
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) | |
# │ │ │ │ │ | |
# │ │ │ │ │ | |
# │ │ │ │ │ | |
- cron: '13 8 * * 0' | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Apply workaround for sudo bug (https://github.com/multiarch/qemu-user-static/issues/17) | |
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# - name: Build and push - Debian [0.13.0] | |
# uses: docker/build-push-action@v6 | |
# with: | |
# file: debian/slim/bookworm/0.13.0/Dockerfile | |
# context: . | |
# platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/ppc64le | |
# push: true | |
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/bookworm-ziglang:0.13.0 | |
- name: Build and push - Debian [master] | |
uses: docker/build-push-action@v6 | |
with: | |
file: debian/slim/bookworm/master/Dockerfile | |
context: . | |
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/ppc64le | |
push: true | |
tags: ${{ secrets.DOCKERHUB_USERNAME }}/bookworm-ziglang:latest | |
# - name: Build and push - Busybox [0.13.0] | |
# uses: docker/build-push-action@v6 | |
# with: | |
# file: busybox/0.13.0/Dockerfile | |
# context: . | |
# platforms: linux/amd64 #,linux/arm64,linux/arm/v7,linux/ppc64le,linux/riscv64 | |
# push: true | |
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/ziglang:0.13.0 | |
- name: Build and push - Busybox [master] | |
uses: docker/build-push-action@v6 | |
with: | |
file: busybox/master/Dockerfile | |
context: . | |
platforms: linux/amd64 #,linux/arm64,linux/arm/v7,linux/ppc64le,linux/riscv64 | |
push: true | |
tags: ${{ secrets.DOCKERHUB_USERNAME }}/ziglang:latest | |
# - name: Build and push - Alpine [0.13.0] | |
# uses: docker/build-push-action@v6 | |
# with: | |
# file: alpine/0.13.0/Dockerfile | |
# context: . | |
# platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/ppc64le,linux/riscv64 | |
# push: true | |
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/alpine-ziglang:0.13.0 | |
- name: Build and push - Alpine [master] | |
uses: docker/build-push-action@v6 | |
with: | |
file: alpine/master/Dockerfile | |
context: . | |
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/ppc64le,linux/riscv64 | |
push: true | |
tags: ${{ secrets.DOCKERHUB_USERNAME }}/alpine-ziglang:latest | |
keepalive-job: | |
name: Keepalive Workflow | |
runs-on: ubuntu-latest | |
permissions: | |
actions: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gautamkrishnar/keepalive-workflow@v2 |