File tree 4 files changed +103
-0
lines changed
4 files changed +103
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Create and publish a Docker image
2
+ on :
3
+ push :
4
+ pull_request :
5
+ schedule :
6
+ # New image every monday morning
7
+ - cron : ' 42 0 * * 1'
8
+
9
+ env :
10
+ REGISTRY : ghcr.io
11
+ IMAGE_NAME : ${{ github.repository }}
12
+
13
+ jobs :
14
+ build-and-push-image :
15
+ runs-on : ubuntu-latest
16
+ permissions :
17
+ contents : read
18
+ packages : write
19
+ strategy :
20
+ matrix :
21
+ variant :
22
+ - fakemachine-bullseye
23
+ - fakemachine-bookworm
24
+ steps :
25
+ - name : Checkout repository
26
+ uses : actions/checkout@v2
27
+
28
+ - name : Log in to the Container registry
29
+ uses : docker/login-action@v1
30
+ with :
31
+ registry : ${{ env.REGISTRY }}
32
+ username : ${{ github.actor }}
33
+ password : ${{ secrets.GITHUB_TOKEN }}
34
+
35
+ - name : Extract metadata (tags, labels) for Docker
36
+ id : meta
37
+ uses : docker/metadata-action@v3
38
+ with :
39
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ matrix.variant }}
40
+ tags : |
41
+ "type=ref,event=branch"
42
+ "type=ref,suffix=-{{sha}},event=branch"
43
+ "type=ref,suffix=-{{date 'YYYYMMDD'}},event=branch"
44
+ "type=ref,event=tag"
45
+ "type=ref,event=pr"
46
+
47
+ - name : Build and push Docker image
48
+ uses : docker/build-push-action@v2
49
+ with :
50
+ context : .
51
+ file : Dockerfile.${{ matrix.variant }}
52
+ push : ${{ github.event_name != 'pull_request' }}
53
+ tags : ${{ steps.meta.outputs.tags }}
54
+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change
1
+ FROM debian:bookworm-slim
2
+
3
+ ARG DEBIAN_FRONTEND=noninteractive
4
+
5
+ # Always install procps in case the docker file gets used in jenkins
6
+ RUN apt update && apt-get install --no-install-recommends -y procps
7
+
8
+ # Bits needed to run fakemachine
9
+ RUN apt-get update && \
10
+ apt-get install --no-install-recommends -y qemu-system-x86 \
11
+ qemu-user-static \
12
+ busybox \
13
+ linux-image-amd64 \
14
+ systemd \
15
+ dbus
16
+
17
+ # Bits needed to build fakemachine
18
+ RUN apt-get update && \
19
+ apt-get install --no-install-recommends -y \
20
+ golang-go \
21
+ git \
22
+ ca-certificates \
23
+ gcc \
24
+ libc6-dev
Original file line number Diff line number Diff line change
1
+ FROM debian:bullseye-slim
2
+
3
+ ARG DEBIAN_FRONTEND=noninteractive
4
+
5
+ # Always install procps in case the docker file gets used in jenkins
6
+ RUN apt update && apt-get install --no-install-recommends -y procps
7
+
8
+ # Bits needed to run fakemachine
9
+ RUN apt-get update && \
10
+ apt-get install --no-install-recommends -y qemu-system-x86 \
11
+ qemu-user-static \
12
+ busybox \
13
+ linux-image-amd64 \
14
+ systemd \
15
+ dbus
16
+
17
+ # Bits needed to build fakemachine
18
+ RUN apt-get update && \
19
+ apt-get install --no-install-recommends -y \
20
+ golang-go \
21
+ git \
22
+ ca-certificates \
23
+ gcc \
24
+ libc6-dev
Original file line number Diff line number Diff line change
1
+ Test containers for debos and fakemachine
You can’t perform that action at this time.
0 commit comments