Skip to content

Commit 8a10f32

Browse files
committed
ci: update Docker hub readmes automatically
1 parent fd2c1df commit 8a10f32

File tree

2 files changed

+132
-0
lines changed

2 files changed

+132
-0
lines changed

.github/workflows/CI.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,15 @@ jobs:
271271
cache-from: type=registry,ref=user/app:latest
272272
cache-to: type=inline
273273

274+
- name: Docker Readme for setup-cpp-${{matrix.container.distro }}
275+
if: ${{ github.event_name != 'pull_request' }}
276+
uses: peter-evans/dockerhub-description@v4
277+
with:
278+
username: aminya
279+
password: ${{ secrets.DOCKERHUB_TOKEN }}
280+
repository: aminya/${{ matrix.container.image }}
281+
readme-filepath: ./README_DOCKER.md
282+
274283
- name: Build setup-cpp-${{matrix.container.distro }}-llvm
275284
uses: docker/build-push-action@v6
276285
with:
@@ -282,6 +291,15 @@ jobs:
282291
cache-from: type=registry,ref=user/app:latest
283292
cache-to: type=inline
284293

294+
- name: Docker Readme for setup-cpp-${{matrix.container.distro }}-llvm
295+
if: ${{ github.event_name != 'pull_request' }}
296+
uses: peter-evans/dockerhub-description@v4
297+
with:
298+
username: aminya
299+
password: ${{ secrets.DOCKERHUB_TOKEN }}
300+
repository: aminya/${{ matrix.container.image }}-llvm
301+
readme-filepath: ./README_DOCKER.md
302+
285303
- name: Test LLVM
286304
if: ${{ !contains(github.event.head_commit.message, '[skip test]') }}
287305
uses: docker/build-push-action@v6
@@ -303,6 +321,15 @@ jobs:
303321
cache-from: type=registry,ref=user/app:latest
304322
cache-to: type=inline
305323

324+
- name: Docker Readme for setup-cpp-${{matrix.container.distro }}-gcc
325+
if: ${{ github.event_name != 'pull_request' }}
326+
uses: peter-evans/dockerhub-description@v4
327+
with:
328+
username: aminya
329+
password: ${{ secrets.DOCKERHUB_TOKEN }}
330+
repository: aminya/${{ matrix.container.image }}-gcc
331+
readme-filepath: ./README_DOCKER.md
332+
306333
- name: Test gcc
307334
if: ${{ !contains(github.event.head_commit.message, '[skip test]') }}
308335
uses: docker/build-push-action@v6
@@ -325,6 +352,14 @@ jobs:
325352
cache-from: type=registry,ref=user/app:latest
326353
cache-to: type=inline
327354

355+
- name: Docker Readme for setup-cpp-${{matrix.container.distro }}-mingw
356+
if: ${{ github.event_name != 'pull_request' }}
357+
uses: peter-evans/dockerhub-description@v4
358+
with:
359+
username: aminya
360+
password: ${{ secrets.DOCKERHUB_TOKEN }}
361+
repository: aminya/${{ matrix.container.image }}-mingw
362+
readme-filepath: ./README_DOCKER.md
328363
- name: Test Mingw
329364
if: ${{ !contains(github.event.head_commit.message, '[skip test]') && !contains(matrix.container.distro, 'fedora') }}
330365
uses: docker/build-push-action@v6

README_DOCKER.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# setup-cpp
2+
3+
Install all the tools required for building and testing C++/C projects.
4+
5+
![Build Status (Github Actions)](https://github.com/aminya/setup-cpp/workflows/CI/badge.svg)
6+
7+
Setting up a **cross-platform** environment for building and testing C++/C projects is a bit tricky. Each platform has its own compilers, and each of them requires a different installation procedure. This package aims to fix this issue.
8+
9+
`setup-cpp` can be used locally from terminal, from CI services like GitHub Actions and GitLab Pipelines, and inside containers like Docker.
10+
11+
`setup-cpp` is supported on many platforms. It is continuously tested on several configurations including Windows (11, 10, 2022, 2019) x64/ARM/x86, Linux (Ubuntu 24.0, 22.04, 20.04, 18.04, Fedora, ArchLinux) x64/ARM64, and macOS (15, 14, 13, 12, 11, 10.15) x64/ARM. `setup-cpp` is backed by unit tests for each tool and integration tests for compiling cpp projects.
12+
13+
See https://github.com/aminya/setup-cpp for more information about using `setup-cpp` in different environments.
14+
15+
### Prebuilt Docker Images
16+
17+
To provide fast development environments, `setup-cpp` provides several prebuilt docker images that have the tools you need. You can use these images as a base image for your project.
18+
19+
The names are in the format `aminya/setup-cpp-<platform>:<platform_version>-<setup_cpp_version>` and `aminya/setup-cpp-<platform>-<compiler>:<platform_version>-<setup_cpp_version>`.
20+
21+
#### Ubuntu Images
22+
23+
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang`
24+
25+
```dockerfile
26+
FROM aminya/setup-cpp-ubuntu:22.04-1.0.0 AS builder
27+
```
28+
29+
Image with `llvm` and the base tools:
30+
31+
```dockerfile
32+
FROM aminya/setup-cpp-ubuntu-llvm:22.04-1.0.0 AS builder
33+
```
34+
35+
Image with `gcc` and the base tools:
36+
37+
```dockerfile
38+
FROM aminya/setup-cpp-ubuntu-gcc:22.04-1.0.0 AS builder
39+
```
40+
41+
Image with `mingw` and the base tools:
42+
43+
```dockerfile
44+
FROM aminya/setup-cpp-ubuntu-mingw:22.04-1.0.0 AS builder
45+
```
46+
47+
#### Fedora Images
48+
49+
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang`
50+
51+
```dockerfile
52+
FROM aminya/setup-cpp-fedora:40-1.0.0 AS builder
53+
```
54+
55+
Image with `llvm` and the base tools:
56+
57+
```dockerfile
58+
FROM aminya/setup-cpp-fedora-llvm:40-1.0.0 AS builder
59+
```
60+
61+
Image with `gcc` and the base tools:
62+
63+
```dockerfile
64+
FROM aminya/setup-cpp-fedora-gcc:40-1.0.0 AS builder
65+
```
66+
67+
Image with `mingw` and the base tools:
68+
69+
```dockerfile
70+
FROM aminya/setup-cpp-fedora-mingw:40-1.0.0 AS builder
71+
```
72+
73+
#### ArchLinux Images
74+
75+
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang`
76+
77+
```dockerfile
78+
FROM aminya/setup-cpp-arch:base-1.0.0 AS builder
79+
```
80+
81+
Image with `llvm` and the base tools:
82+
83+
```dockerfile
84+
FROM aminya/setup-cpp-arch-llvm:base-1.0.0 AS builder
85+
```
86+
87+
Image with `gcc` and the base tools:
88+
89+
```dockerfile
90+
FROM aminya/setup-cpp-arch-gcc:base-1.0.0 AS builder
91+
```
92+
93+
Image with `mingw` and the base tools:
94+
95+
```dockerfile
96+
FROM aminya/setup-cpp-arch-mingw:base-1.0.0 AS builder
97+
```

0 commit comments

Comments
 (0)