-
Notifications
You must be signed in to change notification settings - Fork 77
51 lines (46 loc) · 1.28 KB
/
buildimage.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
name: Build images for Docker Hub
on:
push:
branches:
- master
schedule:
- cron: "0 12 * * TUE" # Run every Tuesday (base run on Monday)
repository_dispatch:
types: [base-container-updated]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
crs-version:
- "3.3.2"
image:
- apache
- nginx
variant:
- ""
- "-alpine"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
driver-opts: image=moby/buildkit:master
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.dockerhub_user }}
password: ${{ secrets.dockerhub_token }}
- name: Build and push ${{ matrix.crs-version }}-${{ matrix.image }}${{ matrix.variant }}
uses: docker/[email protected]
with:
targets: ${{ matrix.image }}${{ matrix.variant }}
files: docker-bake.hcl
push: true