-
Notifications
You must be signed in to change notification settings - Fork 1
90 lines (73 loc) · 2.5 KB
/
build-and-push.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: 'Build docker images'
on:
push:
branches: ['main']
paths:
- '**.Dockerfile'
- '.github/workflows/build-and-push.yml'
schedule:
- cron: '0 1 1 * *'
jobs:
docker:
name: 'Build and push'
runs-on: 'ubuntu-latest'
strategy:
matrix:
include:
- tag: 'amazonlinux-2023'
dockerfile: 'amazonlinux/2023.Dockerfile'
platforms: 'linux/amd64,linux/arm64'
- tag: 'centos-7'
dockerfile: 'centos/7.Dockerfile'
platforms: 'linux/amd64'
- tag: 'debian-10'
dockerfile: 'debian/10.Dockerfile'
platforms: 'linux/amd64,linux/arm64'
- tag: 'debian-11'
dockerfile: 'debian/11.Dockerfile'
platforms: 'linux/amd64,linux/arm64'
- tag: 'debian-12'
dockerfile: 'debian/12.Dockerfile'
platforms: 'linux/amd64,linux/arm64'
- tag: 'fedora-39'
dockerfile: 'fedora/39.Dockerfile'
platforms: 'linux/amd64,linux/arm64'
- tag: 'fedora-40'
dockerfile: 'fedora/40.Dockerfile'
platforms: 'linux/amd64,linux/arm64'
- tag: 'rockylinux-8'
dockerfile: 'rockylinux/8.Dockerfile'
platforms: 'linux/amd64,linux/arm64'
- tag: 'rockylinux-9'
dockerfile: 'rockylinux/9.Dockerfile'
platforms: 'linux/amd64,linux/arm64'
- tag: 'ubuntu-18.04'
dockerfile: 'ubuntu/18.04.Dockerfile'
platforms: 'linux/amd64,linux/arm64'
- tag: 'ubuntu-20.04'
dockerfile: 'ubuntu/20.04.Dockerfile'
platforms: 'linux/amd64,linux/arm64'
- tag: 'ubuntu-22.04'
dockerfile: 'ubuntu/22.04.Dockerfile'
platforms: 'linux/amd64,linux/arm64'
steps:
- name: 'Checkout the codebase'
uses: 'actions/checkout@v4'
- name: 'Set up QEMU'
uses: 'docker/setup-qemu-action@v3'
- name: 'Set up Docker Buildx'
uses: 'docker/setup-buildx-action@v3'
- name: 'Login to DockerHub'
uses: 'docker/login-action@v3'
with:
username: 'antmelekhin'
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: 'Build and push ${{ matrix.tag }}'
uses: 'docker/build-push-action@v6'
with:
context: .
file: '${{ matrix.dockerfile }}'
platforms: '${{ matrix.platforms }}'
push: true
tags: 'antmelekhin/docker-systemd:${{ matrix.tag }}'