-
Notifications
You must be signed in to change notification settings - Fork 18
90 lines (84 loc) · 2.52 KB
/
build_and_publish_docker_images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: "🐋 Publish Docker images"
on:
workflow_dispatch:
schedule:
- cron: "0 7 * * *"
env:
DOCKERHUB_USER: wakemeops
jobs:
docker-publish:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- image: ubuntu
registry_name: ubuntu
tag: latest
- image: ubuntu
registry_name: ubuntu
tag: rolling
- image: ubuntu
registry_name: ubuntu
tag: 22.04
- image: ubuntu
registry_name: ubuntu
tag: 20.04
- image: ubuntu
registry_name: ubuntu
tag: 18.04
- image: debian
registry_name: debian
tag: latest
- image: debian
registry_name: debian
tag: bookworm
- image: debian
registry_name: debian
tag: bookworm-slim
- image: debian
registry_name: debian
tag: bullseye
- image: debian
registry_name: debian
tag: bullseye-slim
- image: debian
registry_name: debian
tag: buster
- image: debian
registry_name: debian
tag: buster-slim
- image: bitnami/minideb
registry_name: minideb
tag: latest
- image: bitnami/minideb
registry_name: minideb
tag: bookworm
- image: bitnami/minideb
registry_name: minideb
tag: bullseye
- image: bitnami/minideb
registry_name: minideb
tag: buster
steps:
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3
- name: Set up QEMU (for multi platform build)
uses: docker/setup-qemu-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Docker image
uses: docker/build-push-action@v6
with:
push: true
tags: docker.io/${{ env.DOCKERHUB_USER }}/${{ matrix.registry_name }}:${{ matrix.tag }}
labels: |
org.wakemeops.maintainers="WakeMeOps <wakemeops.com>"
org.wakemeops.base_image="docker.io/${{ matrix.image }}:${{ matrix.tag }}"
org.wakemeops.commit="${{ github.sha }}"
build-args: |
IMAGE=${{ matrix.image }}
TAG=${{ matrix.tag }}
platforms: linux/amd64,linux/arm64