1+ name : FeOS Nginx Container
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ paths-ignore :
8+ - ' docs/**'
9+ - ' **/*.md'
10+
11+ jobs :
12+ build_nginx_container :
13+ permissions :
14+ contents : read
15+ packages : write
16+
17+ runs-on : ubuntu-latest
18+
19+ steps :
20+ - name : Checkout Code
21+ uses : actions/checkout@v4
22+
23+ - uses : docker/metadata-action@v5
24+ id : meta
25+ with :
26+ images : |
27+ ghcr.io/ironcore-dev/feos/feos-nginx
28+ tags : |
29+ type=ref,event=branch
30+ type=sha,prefix={{branch}}-
31+ type=raw,value=latest,enable={{is_default_branch}}
32+
33+ - name : Set up Docker Buildx
34+ uses : docker/setup-buildx-action@v3
35+
36+ - name : Install Protobuf Compiler
37+ run : sudo apt-get update && sudo apt-get install protobuf-compiler -y
38+
39+ - name : Login to GitHub Container Registry
40+ uses : docker/login-action@v3
41+ with :
42+ registry : ghcr.io
43+ username : ${{ github.actor }}
44+ password : ${{ secrets.GITHUB_TOKEN }}
45+
46+ - name : Set up cargo cache
47+ uses : actions/cache@v4
48+ continue-on-error : false
49+ with :
50+ path : |
51+ ~/.cargo/bin/
52+ ~/.cargo/registry/index/
53+ ~/.cargo/registry/cache/
54+ ~/.cargo/git/db/
55+ target/
56+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
57+ restore-keys : ${{ runner.os }}-cargo-
58+
59+ - name : Run Tests
60+ run : make test
61+
62+ - name : Build build-container
63+ run : make build-container
64+
65+ - name : Set up kernel cache
66+ uses : actions/cache@v4
67+ continue-on-error : false
68+ with :
69+ path : |
70+ target/kernel/
71+ key : ${{ runner.os }}-kernel-${{ hashFiles('hack/kernel/**') }}
72+ restore-keys : ${{ runner.os }}-kernel-
73+
74+ - name : Build Kernel
75+ run : make kernel
76+
77+ - name : Build initramfs
78+ run : make initramfs
79+
80+ - name : Build UKI with secrets
81+ run : |
82+ CMDLINE="console=tty0 console=ttyS0,115200 earlyprintk=ttyS0,115200 consoleblank=0"
83+ echo $CMDLINE > target/cmdline
84+ mkdir -p keys
85+ echo "${{ secrets.SECUREBOOT_PRIVATEKEY }}" > keys/secureboot.key
86+ echo "${{ secrets.SECUREBOOT_CERTIFICATE }}" > keys/secureboot.pem
87+ openssl x509 -in keys/secureboot.pem -out keys/feos.crt -outform DER
88+ make uki
89+
90+ - name : Build nginx container
91+ run : make nginx
92+
93+ - name : Tag and push Docker image
94+ run : |
95+ # Tag the locally built image with the registry tags
96+ for tag in ${{ steps.meta.outputs.tags }}; do
97+ docker tag feos-nginx $tag
98+ done
99+
100+ # Push all tags
101+ for tag in ${{ steps.meta.outputs.tags }}; do
102+ docker push $tag
103+ done
0 commit comments