-
Notifications
You must be signed in to change notification settings - Fork 33
106 lines (88 loc) · 4.33 KB
/
build-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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#
# Copyright (c) 2019-2024 Ruben Perez Hidalgo (rubenperez038 at gmail dot com)
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
name: Build Docker images
on:
workflow_dispatch:
push:
paths:
- tools/docker/**
jobs:
linux-images:
strategy:
matrix:
include:
- { image: build-clang3_6, dockerfile: build-clang3_6, platforms: "linux/amd64", }
- { image: build-clang7, dockerfile: build-clang7, platforms: "linux/amd64", }
- { image: build-clang11, dockerfile: build-clang11, platforms: "linux/amd64", }
- { image: build-clang14, dockerfile: build-clang14, platforms: "linux/amd64, linux/arm64/v8" }
- { image: build-clang16, dockerfile: build-clang16, platforms: "linux/amd64" }
- { image: build-clang16-i386, dockerfile: build-clang16-i386, platforms: "linux/amd64" }
- { image: build-gcc5, dockerfile: build-gcc5, platforms: "linux/amd64", }
- { image: build-gcc6, dockerfile: build-gcc6, platforms: "linux/amd64", }
- { image: build-gcc10, dockerfile: build-gcc10, platforms: "linux/amd64", }
- { image: build-gcc11, dockerfile: build-gcc11, platforms: "linux/amd64, linux/arm64/v8" }
- { image: build-gcc13, dockerfile: build-gcc13, platforms: "linux/amd64" }
- { image: build-cmake3_8, dockerfile: build-cmake3_8, platforms: "linux/amd64", }
- { image: build-noopenssl, dockerfile: build-noopenssl, platforms: "linux/amd64", }
- { image: build-docs, dockerfile: build-docs, platforms: "linux/amd64", }
- { image: mysql5, dockerfile: mysql5, platforms: "linux/amd64", }
- { image: mysql8, dockerfile: mysql8, platforms: "linux/amd64, linux/arm64/v8" }
- { image: mariadb, dockerfile: mariadb, platforms: "linux/amd64, linux/arm64/v8" }
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: anarthal-containers
password: ${{ secrets.ANARTHAL_CONTAINERS_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
file: tools/docker/${{ matrix.dockerfile }}.dockerfile
build-args: ${{ matrix.build-args }}
platforms: ${{ matrix.platforms }}
tags: ghcr.io/anarthal-containers/${{ matrix.image }}:${{ github.sha }}, ghcr.io/anarthal-containers/${{ matrix.image }}:latest
windows-images:
strategy:
matrix:
include:
- { image: build-msvc14_1, base-image: "cppalliance/dronevs2017:1" }
- { image: build-msvc14_2, base-image: "cppalliance/dronevs2019:1" }
- { image: build-msvc14_3, base-image: "cppalliance/dronevs2022:1" }
permissions:
contents: read
packages: write
runs-on: windows-2019
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: anarthal-containers
password: ${{ secrets.ANARTHAL_CONTAINERS_TOKEN }}
- name: Build and push Docker image
run: |
FULL_IMAGE=ghcr.io/anarthal-containers/${{ matrix.image }}
docker build -f tools/docker/build-msvc.dockerfile --build-arg BASE_IMAGE=${{ matrix.base-image }} -t $FULL_IMAGE:$GITHUB_SHA -t $FULL_IMAGE:latest .
docker push $FULL_IMAGE --all-tags