Skip to content

Commit 77f79be

Browse files
committed
ci: build ubuntu-jammy container during ci
Signed-off-by: Alan Wandke <[email protected]>
1 parent 931b4ee commit 77f79be

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: Build and Push Containers
3+
4+
on:
5+
push:
6+
#TODO: remove this on PR, only do this on pushes to main
7+
pull_request:
8+
branches: [main]
9+
10+
env:
11+
REPO: ${{ github.repository }}
12+
REGISTRY: ghcr.io
13+
14+
permissions:
15+
packages: write
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
distro:
23+
# - { name: "fedora-41", dockerfile: "ci/fedora-41.Dockerfile" }
24+
# - { name: "fedora-42", dockerfile: "ci/fedora-42.Dockerfile" }
25+
- { name: "ubuntu-jammy", dockerfile: "ci/ubuntu-jammy.Dockerfile" }
26+
# - { name: "ubuntu-noble", dockerfile: "ci/ubuntu-noble.Dockerfile" }
27+
# - { name: "rocky-9", dockerfile: "ci/rocky-9.Dockerfile" }
28+
steps:
29+
- name: Checkout repo
30+
uses: actions/checkout@v4
31+
32+
- name: Log in to GitHub Container Registry
33+
uses: docker/login-action@v3
34+
with:
35+
registry: ghcr.io
36+
username: ${{ github.actor }}
37+
password: ${{ secrets.GITHUB_TOKEN }}
38+
39+
- name: Build image
40+
run: |
41+
docker build \
42+
-f ${{ matrix.distro.dockerfile }} \
43+
-t ${{ env.REGISTRY }}/${{ env.REPO }}-build-${{ matrix.distro.name }}:latest .
44+
45+
- name: Push image
46+
run: |
47+
docker push ${{ env.REGISTRY }}/${{ env.REPO }}-build-${{ matrix.distro.name }}:latest

ci/ubuntu-jammy.Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Usedduring GitHub actions
2+
FROM ubuntu:jammy
3+
4+
LABEL org.opencontainers.image.source=https://github.com/NationalSecurityAgency/seabee
5+
6+
COPY scripts /scripts
7+
8+
RUN DOCKER=1 /scripts/update_dependencies.sh \
9+
&& rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)