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