Skip to content

Commit 08e4e45

Browse files
authored
Add f41 image building and modify weekly cache workflow. (#752)
* Add f41 image building and modify weekly cache workflow. * install additional libraries * Fix yamllint * modify weekly cache workflow * fix copilot findings * fix yamllint
1 parent d37cef0 commit 08e4e45

3 files changed

Lines changed: 103 additions & 310 deletions

File tree

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: "[DLS] [F41] Build F41 image"
2+
run-name: "[DLS] [F41] Build F41 image (by ${{ github.actor }})"
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
6+
permissions: {}
7+
8+
env:
9+
DLS_REL_PATH: "./dlstreamer"
10+
11+
jobs:
12+
build:
13+
name: "Build f41 img"
14+
runs-on: dlstreamer
15+
container:
16+
image: fedora:41
17+
permissions:
18+
contents: read
19+
packages: read
20+
steps:
21+
- name: Install dependencies
22+
run: |
23+
dnf update -y
24+
dnf install -y git docker
25+
26+
- name: Check out dlstreamer repository
27+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #6.0.2
28+
with:
29+
persist-credentials: false
30+
path: dlstreamer
31+
32+
- name: Init submodules
33+
run: |
34+
cd dlstreamer
35+
git submodule update --init thirdparty/spdlog
36+
37+
- name: Set up Docker Buildx
38+
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd #4.0.0
39+
40+
- name: Log in to GitHub Container Registry
41+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 #4.0.0
42+
with:
43+
registry: ghcr.io
44+
username: ${{ github.actor }}
45+
password: ${{ secrets.GITHUB_TOKEN }}
46+
47+
- name: 🚢 Build f41 img with cache from GHCR
48+
env:
49+
f41_img: ghcr.io/${{ github.repository }}/f41-img:${{ github.sha }}
50+
f41_img_cached: ghcr.io/${{ github.repository }}/f41-img:buildcache
51+
run: |
52+
docker buildx build \
53+
--load \
54+
--target dlstreamer \
55+
--tag "${f41_img}" \
56+
--cache-from=type=registry,ref="${f41_img_cached}" \
57+
-f ./dlstreamer/docker/fedora41/fedora41.Dockerfile \
58+
${{ env.DLS_REL_PATH }}
59+
60+
- name: Clean up
61+
if: always()
62+
env:
63+
f41_img: ghcr.io/${{ github.repository }}/f41-img:${{ github.sha }}
64+
run: |
65+
rm -rf dlstreamer
66+
docker rmi ${f41_img} || true

.github/workflows/dls-pr-workflow.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,13 @@ jobs:
400400
with:
401401
test-repo-branch: ${{ inputs.test-repo-branch }}
402402
# -------------------------------------------------------- BUILDS & TESTS ---------------------------------------------------------
403+
dls-build-fedora-img:
404+
permissions:
405+
contents: read
406+
packages: read
407+
name: "DLS BUILD: fedora41 img"
408+
uses: ./.github/workflows/dls-build-fedora41-images.yaml
409+
403410
dls-build-sources-make-build:
404411
permissions:
405412
contents: read

0 commit comments

Comments
 (0)