@@ -179,57 +179,11 @@ jobs:
179179 name : fedora-39-latest
180180 path : pkg/fedora/out/x86_64
181181
182-
183- build-f38 :
184- if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
185-
186- name : Build Fedora 38 package
187- runs-on : ubuntu-latest
188- needs : [lint, test]
189- container :
190- image : registry.fedoraproject.org/fedora:38
191- options : --security-opt seccomp=unconfined
192-
193- steps :
194- - name : Checkout code
195- uses : actions/checkout@v4
196-
197- - name : Install build dependencies
198- run : |
199- dnf distro-sync -y
200- dnf install -y rpmdevtools rpm-sign 'dnf-command(builddep)'
201- dnf builddep -y pkg/fedora/surface-control.spec
202-
203- - name : Build package
204- run : |
205- cd pkg/fedora
206- # Build the .rpm packages
207- ./makerpm
208-
209- - name : Sign packages
210- env :
211- GPG_KEY_ID : 56C464BAAC421453
212- GPG_KEY : ${{ secrets.LINUX_SURFACE_GPG_KEY }}
213- run : |
214- cd pkg/fedora/out/x86_64
215-
216- # import GPG key
217- echo "$GPG_KEY" | base64 -d | gpg --import --no-tty --batch --yes
218-
219- # sign package
220- rpm --resign *.rpm --define "_gpg_name $GPG_KEY_ID"
221-
222- - name : Upload artifacts
223- uses : actions/upload-artifact@v4
224- with :
225- name : fedora-38-latest
226- path : pkg/fedora/out/x86_64
227-
228182 release :
229183 if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
230184
231185 name : Publish release
232- needs : [build-bin, build-deb, build-f39, build-f38 ]
186+ needs : [build-bin, build-deb, build-f39]
233187 runs-on : ubuntu-latest
234188
235189 steps :
@@ -251,12 +205,6 @@ jobs:
251205 name : fedora-39-latest
252206 path : fedora-39-latest
253207
254- - name : Download Fedora 38 artifacts
255- uses : actions/download-artifact@v4
256- with :
257- name : fedora-38-latest
258- path : fedora-38-latest
259-
260208 - name : Upload assets
261209 uses : svenstaro/upload-release-action@v2
262210 with :
@@ -370,57 +318,3 @@ jobs:
370318 git add .
371319 git commit -m "Update Fedora 39 surface-control"
372320 git push --set-upstream origin "${update_branch}"
373-
374-
375- repo-f38 :
376- name : Update Fedora 38 package repository
377- needs : [release]
378- runs-on : ubuntu-latest
379- container :
380- image : registry.fedoraproject.org/fedora:38
381- options : --security-opt seccomp=unconfined
382- steps :
383- - name : Install dependencies
384- run : |
385- dnf install -y git findutils
386-
387- - name : Download artifacts
388- uses : actions/download-artifact@v4
389- with :
390- name : fedora-38-latest
391- path : fedora-38-latest
392-
393- - name : Update repository
394- env :
395- SURFACEBOT_TOKEN : ${{ secrets.LINUX_SURFACE_BOT_TOKEN }}
396- BRANCH_STAGING : u/staging
397- GIT_REF : ${{ github.ref }}
398- run : |
399- repo="https://surfacebot:${SURFACEBOT_TOKEN}@github.com/linux-surface/repo.git"
400-
401- # clone package repository
402- git clone -b "${BRANCH_STAGING}" "${repo}" repo
403-
404- # copy packages
405- cp fedora-38-latest/* repo/fedora/f38
406- cd repo/fedora/f38
407-
408- # parse git tag from ref
409- GIT_TAG=$(echo $GIT_REF | sed 's|^refs/tags/||g')
410-
411- # convert packages into references
412- for pkg in $(find . -name '*.rpm'); do
413- echo "surface-control:$GIT_TAG/$(basename $pkg)" > $pkg.blob
414- rm $pkg
415- done
416-
417- # set git identity
418- git config --global user.email "[email protected] " 419- git config --global user.name "surfacebot"
420-
421- # commit and push
422- update_branch="${BRANCH_STAGING}-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)"
423- git checkout -b "${update_branch}"
424- git add .
425- git commit -m "Update Fedora 38 surface-control"
426- git push --set-upstream origin "${update_branch}"
0 commit comments