@@ -245,3 +245,154 @@ jobs:
245245 tag : ${{ github.ref }}
246246 overwrite : true
247247 file_glob : true
248+
249+ repo-deb :
250+ name : Update Debian package repository
251+ needs : [release]
252+ runs-on : ubuntu-latest
253+ container : debian:sid
254+ steps :
255+ - name : Install dependencies
256+ run : |
257+ apt-get update
258+ apt-get install -y git
259+
260+ - name : Download artifacts
261+ uses : actions/download-artifact@v1
262+ with :
263+ name : debian-latest
264+
265+ - name : Update repository
266+ env :
267+ SURFACEBOT_TOKEN : ${{ secrets.GITHUB_BOT_TOKEN }}
268+ BRANCH_STAGING : u/staging
269+ GIT_REF : ${{ github.ref }}
270+ run : |
271+ repo="https://surfacebot:${SURFACEBOT_TOKEN}@github.com/linux-surface/repo.git"
272+
273+ # clone package repository
274+ git clone -b "${BRANCH_STAGING}" "${repo}" repo
275+
276+ # copy packages
277+ cp debian-latest/* repo/debian/
278+ cd repo/debian
279+
280+ # parse git tag from ref
281+ GIT_TAG=$(echo $GIT_REF | sed 's|^refs/tags/||g')
282+
283+ # convert packages into references
284+ for pkg in $(find . -name '*.deb'); do
285+ echo "surface-dtx-daemon:$GIT_TAG/$(basename $pkg)" > $pkg.blob
286+ rm $pkg
287+ done
288+
289+ # set git identity
290+ git config --global user.email "[email protected] " 291+ git config --global user.name "surfacebot"
292+
293+ # commit and push
294+ update_branch="${BRANCH_STAGING}-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)"
295+ git switch -c "${update_branch}"
296+ git add .
297+ git commit -m "Update Debian secure-boot MOK"
298+ git push --set-upstream origin "${update_branch}"
299+
300+ repo-f31 :
301+ name : Update Fedora 31 package repository
302+ needs : [release]
303+ runs-on : ubuntu-latest
304+ container : fedora:31
305+ steps :
306+ - name : Install dependencies
307+ run : |
308+ dnf install -y git findutils
309+
310+ - name : Download artifacts
311+ uses : actions/download-artifact@v1
312+ with :
313+ name : fedora-31-latest
314+
315+ - name : Update repository
316+ env :
317+ SURFACEBOT_TOKEN : ${{ secrets.GITHUB_BOT_TOKEN }}
318+ BRANCH_STAGING : u/staging
319+ GIT_REF : ${{ github.ref }}
320+ run : |
321+ repo="https://surfacebot:${SURFACEBOT_TOKEN}@github.com/linux-surface/repo.git"
322+
323+ # clone package repository
324+ git clone -b "${BRANCH_STAGING}" "${repo}" repo
325+
326+ # copy packages
327+ cp fedora-31-latest/* repo/fedora/f31
328+ cd repo/fedora/f31
329+
330+ # parse git tag from ref
331+ GIT_TAG=$(echo $GIT_REF | sed 's|^refs/tags/||g')
332+
333+ # convert packages into references
334+ for pkg in $(find . -name '*.rpm'); do
335+ echo "surface-dtx-daemon:$GIT_TAG/$(basename $pkg)" > $pkg.blob
336+ rm $pkg
337+ done
338+
339+ # set git identity
340+ git config --global user.email "[email protected] " 341+ git config --global user.name "surfacebot"
342+
343+ # commit and push
344+ update_branch="${BRANCH_STAGING}-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)"
345+ git checkout -b "${update_branch}"
346+ git add .
347+ git commit -m "Update Fedora 31 secure-boot MOK"
348+ git push --set-upstream origin "${update_branch}"
349+
350+ repo-f30 :
351+ name : Update Fedora 30 package repository
352+ needs : [release]
353+ runs-on : ubuntu-latest
354+ container : fedora:30
355+ steps :
356+ - name : Install dependencies
357+ run : |
358+ dnf install -y git findutils
359+
360+ - name : Download artifacts
361+ uses : actions/download-artifact@v1
362+ with :
363+ name : fedora-30-latest
364+
365+ - name : Update repository
366+ env :
367+ SURFACEBOT_TOKEN : ${{ secrets.GITHUB_BOT_TOKEN }}
368+ BRANCH_STAGING : u/staging
369+ GIT_REF : ${{ github.ref }}
370+ run : |
371+ repo="https://surfacebot:${SURFACEBOT_TOKEN}@github.com/linux-surface/repo.git"
372+
373+ # clone package repository
374+ git clone -b "${BRANCH_STAGING}" "${repo}" repo
375+
376+ # copy packages
377+ cp fedora-30-latest/* repo/fedora/f30
378+ cd repo/fedora/f30
379+
380+ # parse git tag from ref
381+ GIT_TAG=$(echo $GIT_REF | sed 's|^refs/tags/||g')
382+
383+ # convert packages into references
384+ for pkg in $(find . -name '*.rpm'); do
385+ echo "surface-dtx-daemon:$GIT_TAG/$(basename $pkg)" > $pkg.blob
386+ rm $pkg
387+ done
388+
389+ # set git identity
390+ git config --global user.email "[email protected] " 391+ git config --global user.name "surfacebot"
392+
393+ # commit and push
394+ update_branch="${BRANCH_STAGING}-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)"
395+ git checkout -b "${update_branch}"
396+ git add .
397+ git commit -m "Update Fedora 30 secure-boot MOK"
398+ git push --set-upstream origin "${update_branch}"
0 commit comments