forked from tiran/certifi-system-store
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (59 loc) · 1.59 KB
/
containers.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
---
name: distro containers
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
repository_dispatch:
types: rebuild
workflow_dispatch:
inputs:
git-ref:
required: false
jobs:
distros:
name: "Container ${{ matrix.distro }}"
runs-on: "ubuntu-20.04"
strategy:
fail-fast: false
matrix:
distro: [
"alpine",
"quay.io/centos/centos:stream9",
"debian:10", "debian:11", "debian:12",
"fedora:35", "fedora:36", "fedora:37", "fedora:38",
"fedora:39", "fedora:40", "fedora:41",
"opensuse/leap",
"ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04", "ubuntu:24.10",
"gentoo/stage3"
]
steps:
- name: checkout
uses: "actions/checkout@v3"
- name: Define tag
run: |
suffix="${distro//:/_}"
suffix="${suffix////_}"
echo "tag=certsysstore:$suffix" >> $GITHUB_ENV
env:
distro: ${{ matrix.distro }}
- name: Create Dockerfile
run: |
cat > Dockerfile << EOF
FROM ${{ matrix.distro }}
COPY .github/provision.sh /
RUN /provision.sh
VOLUME /workdir
WORKDIR /workdir
COPY .github/entry.sh /
ENTRYPOINT /entry.sh
EOF
- name: "Build container ${{ matrix.distro }}"
run: |
set -xe
docker build . -f Dockerfile -t ${{ env.tag }}
- name: "Run container ${{ matrix.distro }}"
run: |
set -xe
docker run --volume $(pwd):/workdir ${{ env.tag }}