@@ -102,6 +102,47 @@ jobs:
102
102
name : arch-latest
103
103
path : release
104
104
105
+ build-f35 :
106
+ name : Build Fedora 35 package
107
+ runs-on : ubuntu-latest
108
+ container :
109
+ image : fedora:35
110
+ options : --security-opt seccomp=unconfined
111
+ steps :
112
+ - name : Checkout code
113
+ uses : actions/checkout@v2
114
+
115
+ - name : Install build dependencies
116
+ run : |
117
+ dnf distro-sync -y
118
+ dnf install -y rpmdevtools rpm-sign 'dnf-command(builddep)'
119
+ dnf builddep -y fedora/surface-secureboot.spec
120
+
121
+ - name : Build package
122
+ run : |
123
+ cd fedora
124
+
125
+ # Build the .rpm packages
126
+ ./makerpm
127
+
128
+ - name : Sign packages
129
+ env :
130
+ GPG_KEY : ${{ secrets.SURFACE_GPG_KEY }}
131
+ run : |
132
+ cd fedora/out/noarch
133
+
134
+ # import GPG key
135
+ echo "$GPG_KEY" | base64 -d | gpg --import --no-tty --batch --yes
136
+
137
+ # sign packages
138
+ rpm --resign *.rpm --define "_gpg_name $GPG_KEY_ID"
139
+
140
+ - name : Upload artifacts
141
+ uses : actions/upload-artifact@v1
142
+ with :
143
+ name : fedora-35-latest
144
+ path : fedora/out/noarch
145
+
105
146
build-f34 :
106
147
name : Build Fedora 34 package
107
148
runs-on : ubuntu-latest
@@ -182,7 +223,7 @@ jobs:
182
223
183
224
release :
184
225
name : Publish release
185
- needs : [build-deb, build-arch, build-f34, build-f33]
226
+ needs : [build-deb, build-arch, build-f35, build- f34, build-f33]
186
227
runs-on : ubuntu-latest
187
228
steps :
188
229
- name : Download Debian artifacts
@@ -195,6 +236,11 @@ jobs:
195
236
with :
196
237
name : arch-latest
197
238
239
+ - name : Download Fedora 35 artifacts
240
+ uses : actions/download-artifact@v1
241
+ with :
242
+ name : fedora-35-latest
243
+
198
244
- name : Download Fedora 34 artifacts
199
245
uses : actions/download-artifact@v1
200
246
with :
@@ -314,6 +360,58 @@ jobs:
314
360
git commit -m "Update Arch Linux secure-boot MOK"
315
361
git push --set-upstream origin "${update_branch}"
316
362
363
+ repo-f35 :
364
+ name : Update Fedora 35 package repository
365
+ needs : [release]
366
+ runs-on : ubuntu-latest
367
+ container :
368
+ image : fedora:35
369
+ options : --security-opt seccomp=unconfined
370
+ steps :
371
+ - name : Install dependencies
372
+ run : |
373
+ dnf install -y git findutils
374
+
375
+ - name : Download artifacts
376
+ uses : actions/download-artifact@v1
377
+ with :
378
+ name : fedora-35-latest
379
+
380
+ - name : Update repository
381
+ env :
382
+ SURFACEBOT_TOKEN : ${{ secrets.GITHUB_BOT_TOKEN }}
383
+ BRANCH_STAGING : u/staging
384
+ GIT_REF : ${{ github.ref }}
385
+ run : |
386
+ repo="https://surfacebot:${SURFACEBOT_TOKEN}@github.com/linux-surface/repo.git"
387
+
388
+ # clone package repository
389
+ git clone -b "${BRANCH_STAGING}" "${repo}" repo
390
+
391
+ # copy packages
392
+ cp fedora-35-latest/* repo/fedora/f35
393
+ cd repo/fedora/f35
394
+
395
+ # parse git tag from ref
396
+ GIT_TAG=$(echo $GIT_REF | sed 's|^refs/tags/||g')
397
+
398
+ # convert packages into references
399
+ for pkg in $(find . -name '*.rpm'); do
400
+ echo "secureboot-mok:$GIT_TAG/$(basename $pkg)" > $pkg.blob
401
+ rm $pkg
402
+ done
403
+
404
+ # set git identity
405
+ git config --global user.email "[email protected] "
406
+ git config --global user.name "surfacebot"
407
+
408
+ # commit and push
409
+ update_branch="${BRANCH_STAGING}-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)"
410
+ git checkout -b "${update_branch}"
411
+ git add .
412
+ git commit -m "Update Fedora 35 secure-boot MOK"
413
+ git push --set-upstream origin "${update_branch}"
414
+
317
415
repo-f34 :
318
416
name : Update Fedora 34 package repository
319
417
needs : [release]
0 commit comments