@@ -182,9 +182,48 @@ jobs:
182
182
name : fedora-41-latest
183
183
path : fedora/out/noarch
184
184
185
+ build-f42 :
186
+ name : Build Fedora 42 package
187
+ runs-on : ubuntu-latest
188
+ container : registry.fedoraproject.org/fedora:42
189
+ steps :
190
+ - name : Checkout code
191
+ uses : actions/checkout@v4
192
+
193
+ - name : Install build dependencies
194
+ run : |
195
+ dnf distro-sync -y
196
+ dnf install -y rpmdevtools rpm-sign 'dnf-command(builddep)'
197
+ dnf builddep -y fedora/surface-secureboot.spec
198
+
199
+ - name : Build package
200
+ run : |
201
+ cd fedora
202
+
203
+ # Build the .rpm packages
204
+ ./makerpm
205
+
206
+ - name : Sign packages
207
+ env :
208
+ GPG_KEY : ${{ secrets.LINUX_SURFACE_GPG_KEY }}
209
+ run : |
210
+ cd fedora/out/noarch
211
+
212
+ # import GPG key
213
+ echo "$GPG_KEY" | base64 -d | gpg --import --no-tty --batch --yes
214
+
215
+ # sign packages
216
+ rpm --resign *.rpm --define "_gpg_name $GPG_KEY_ID"
217
+
218
+ - name : Upload artifacts
219
+ uses : actions/upload-artifact@v4
220
+ with :
221
+ name : fedora-42-latest
222
+ path : fedora/out/noarch
223
+
185
224
release :
186
225
name : Publish release
187
- needs : [build-deb, build-arch, build-f40, build-f41]
226
+ needs : [build-deb, build-arch, build-f40, build-f41, build-f42 ]
188
227
runs-on : ubuntu-latest
189
228
steps :
190
229
- name : Download Debian artifacts
@@ -211,6 +250,12 @@ jobs:
211
250
name : fedora-41-latest
212
251
path : fedora-41-latest
213
252
253
+ - name : Download Fedora 42 artifacts
254
+ uses : actions/download-artifact@v4
255
+ with :
256
+ name : fedora-42-latest
257
+ path : fedora-42-latest
258
+
214
259
- name : Upload assets
215
260
uses : svenstaro/upload-release-action@v2
216
261
with :
@@ -424,3 +469,54 @@ jobs:
424
469
git add .
425
470
git commit -m "Update Fedora 41 secure-boot MOK"
426
471
git push --set-upstream origin "${update_branch}"
472
+
473
+ repo-f42 :
474
+ name : Update Fedora 42 package repository
475
+ needs : [release]
476
+ runs-on : ubuntu-latest
477
+ container : registry.fedoraproject.org/fedora:42
478
+ steps :
479
+ - name : Install dependencies
480
+ run : |
481
+ dnf install -y git findutils
482
+
483
+ - name : Download artifacts
484
+ uses : actions/download-artifact@v4
485
+ with :
486
+ name : fedora-42-latest
487
+ path : fedora-42-latest
488
+
489
+ - name : Update repository
490
+ env :
491
+ SURFACEBOT_TOKEN : ${{ secrets.LINUX_SURFACE_BOT_TOKEN }}
492
+ BRANCH_STAGING : u/staging
493
+ GIT_REF : ${{ github.ref }}
494
+ run : |
495
+ repo="https://surfacebot:${SURFACEBOT_TOKEN}@github.com/linux-surface/repo.git"
496
+
497
+ # clone package repository
498
+ git clone -b "${BRANCH_STAGING}" "${repo}" repo
499
+
500
+ # copy packages
501
+ cp fedora-42-latest/* repo/fedora/f42
502
+ cd repo/fedora/f41
503
+
504
+ # parse git tag from ref
505
+ GIT_TAG=$(echo $GIT_REF | sed 's|^refs/tags/||g')
506
+
507
+ # convert packages into references
508
+ for pkg in $(find . -name '*.rpm'); do
509
+ echo "secureboot-mok:$GIT_TAG/$(basename $pkg)" > $pkg.blob
510
+ rm $pkg
511
+ done
512
+
513
+ # set git identity
514
+ git config --global user.email "[email protected] "
515
+ git config --global user.name "surfacebot"
516
+
517
+ # commit and push
518
+ update_branch="${BRANCH_STAGING}-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)"
519
+ git checkout -b "${update_branch}"
520
+ git add .
521
+ git commit -m "Update Fedora 41 secure-boot MOK"
522
+ git push --set-upstream origin "${update_branch}"
0 commit comments