Skip to content

Commit 6513d0e

Browse files
committed
Trying Github Actions matrix configuration, with multilple Dockerfiles (because I do not know how to template yet).
1 parent e05c05b commit 6513d0e

3 files changed

Lines changed: 37 additions & 3 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,25 @@ on:
66
pull_request:
77
branches: [master, testing]
88

9+
env:
10+
registry: unixerius
11+
image: proxmox-qdevice
12+
913
jobs:
1014

1115
build:
1216

1317
runs-on: ubuntu-latest
1418

19+
strategy:
20+
matrix:
21+
debianver: [bookworm, trixie]
22+
platforms: [linux/amd64, linux/arm64]
23+
1524
permissions:
1625
contents: read
1726
packages: write
27+
attestations: write
1828

1929
steps:
2030
- name: Checkout sources
@@ -56,10 +66,11 @@ jobs:
5666
push: true
5767
provenance: mode=max
5868
sbom: true
59-
platforms: linux/amd64,linux/arm64
69+
platforms: ${{matrix.platforms}}
70+
file: Dockerfile-${{matrix.debianver}}
6071
tags: |
61-
unixerius/proxmox-qdevice:latest
62-
ghcr.io/unixerius/proxmox-qdevice:latest
72+
${{ env.registry }}/${{ env.image }}:${{matrix.debianver}}
73+
ghcr.io/${{ env.registry }}/${{ env.image }}:${{matrix.debianver}}
6374
6475
- name: Docker Scout
6576
id: docker-scout

Dockerfile-bookworm

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM dhi.io/debian-base:bookworm
2+
3+
RUN apt update \
4+
&& apt -y upgrade \
5+
&& apt install --no-install-recommends -y supervisor openssh-server corosync-qnetd \
6+
&& apt -y autoremove \
7+
&& apt clean all
8+
9+
# Proxmox relies upon SSH between cluster nodes using the root account.
10+
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
11+
COPY set_root_password.sh /usr/local/bin/set_root_password.sh
12+
RUN chown root:root /usr/local/bin/set_root_password.sh \
13+
&& chmod 755 /usr/local/bin/set_root_password.sh
14+
15+
RUN mkdir -p /run/sshd
16+
17+
COPY supervisord.conf /etc/supervisord.conf
18+
19+
EXPOSE 22
20+
EXPOSE 5403
21+
22+
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
23+
File renamed without changes.

0 commit comments

Comments
 (0)