Skip to content

Commit afc40c6

Browse files
authored
Merge branch 'master' into renovate/ubuntu-24.x
2 parents 3301504 + 694f7f2 commit afc40c6

File tree

1 file changed

+144
-0
lines changed

1 file changed

+144
-0
lines changed

.github/workflows/docker-build.yml

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
name: Build Docker Images
2+
3+
on:
4+
push:
5+
branches: [master]
6+
paths:
7+
- "**/Dockerfile"
8+
- ".github/workflows/docker-build.yml"
9+
pull_request:
10+
branches: [master]
11+
paths:
12+
- "**/Dockerfile"
13+
- ".github/workflows/docker-build.yml"
14+
workflow_dispatch:
15+
16+
jobs:
17+
build-web-servers:
18+
name: Build Web Servers & Proxies
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
image:
23+
- nginx
24+
- nginx-geoip2
25+
- nginx-http2
26+
- nginx-rtmp
27+
- haproxy
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v3
33+
34+
- name: Login to Docker Hub
35+
if: github.event_name != 'pull_request'
36+
uses: docker/login-action@v3
37+
with:
38+
username: ${{ secrets.DOCKER_USERNAME }}
39+
password: ${{ secrets.DOCKER_PASSWORD }}
40+
41+
- name: Build and push
42+
uses: docker/build-push-action@v5
43+
with:
44+
context: ./${{ matrix.image }}
45+
push: ${{ github.event_name != 'pull_request' }}
46+
tags: voxxit/${{ matrix.image }}:latest
47+
cache-from: type=gha
48+
cache-to: type=gha,mode=max
49+
50+
build-databases:
51+
name: Build Databases & Caching
52+
runs-on: ubuntu-latest
53+
strategy:
54+
matrix:
55+
image:
56+
- pg
57+
- redis
58+
- memcached
59+
steps:
60+
- uses: actions/checkout@v4
61+
62+
- name: Set up Docker Buildx
63+
uses: docker/setup-buildx-action@v3
64+
65+
- name: Login to Docker Hub
66+
if: github.event_name != 'pull_request'
67+
uses: docker/login-action@v3
68+
with:
69+
username: ${{ secrets.DOCKER_USERNAME }}
70+
password: ${{ secrets.DOCKER_PASSWORD }}
71+
72+
- name: Build and push
73+
uses: docker/build-push-action@v5
74+
with:
75+
context: ./${{ matrix.image }}
76+
push: ${{ github.event_name != 'pull_request' }}
77+
tags: voxxit/${{ matrix.image }}:latest
78+
cache-from: type=gha
79+
cache-to: type=gha,mode=max
80+
81+
build-infrastructure:
82+
name: Build Infrastructure & Tools
83+
runs-on: ubuntu-latest
84+
strategy:
85+
matrix:
86+
image:
87+
- vault
88+
- powerdns
89+
- rsyslog
90+
- apt-mirror
91+
- swarm
92+
steps:
93+
- uses: actions/checkout@v4
94+
95+
- name: Set up Docker Buildx
96+
uses: docker/setup-buildx-action@v3
97+
98+
- name: Login to Docker Hub
99+
if: github.event_name != 'pull_request'
100+
uses: docker/login-action@v3
101+
with:
102+
username: ${{ secrets.DOCKER_USERNAME }}
103+
password: ${{ secrets.DOCKER_PASSWORD }}
104+
105+
- name: Build and push
106+
uses: docker/build-push-action@v5
107+
with:
108+
context: ./${{ matrix.image }}
109+
push: ${{ github.event_name != 'pull_request' }}
110+
tags: voxxit/${{ matrix.image }}:latest
111+
cache-from: type=gha
112+
cache-to: type=gha,mode=max
113+
114+
build-development:
115+
name: Build Development Tools
116+
runs-on: ubuntu-latest
117+
strategy:
118+
matrix:
119+
image:
120+
- grunt
121+
- rails
122+
- jq
123+
- goaccess
124+
steps:
125+
- uses: actions/checkout@v4
126+
127+
- name: Set up Docker Buildx
128+
uses: docker/setup-buildx-action@v3
129+
130+
- name: Login to Docker Hub
131+
if: github.event_name != 'pull_request'
132+
uses: docker/login-action@v3
133+
with:
134+
username: ${{ secrets.DOCKER_USERNAME }}
135+
password: ${{ secrets.DOCKER_PASSWORD }}
136+
137+
- name: Build and push
138+
uses: docker/build-push-action@v5
139+
with:
140+
context: ./${{ matrix.image }}
141+
push: ${{ github.event_name != 'pull_request' }}
142+
tags: voxxit/${{ matrix.image }}:latest
143+
cache-from: type=gha
144+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)