@@ -272,3 +272,75 @@ jobs:
272272 GH_TOKEN : ${{ github.token }}
273273 TAG : ${{ github.event.release.tag_name }}
274274 working-directory : ${{ steps.download.outputs.download-path }}
275+
276+ aur :
277+ name : Update the AUR
278+ # if: github.repository == 'Eeems/python-ext4' && github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
279+ # needs: publish
280+ runs-on : ubuntu-latest
281+ container :
282+ image : eeems/archlinux:nuitka
283+ options : --user=root:root
284+ steps :
285+ - name : Setup
286+ run : |
287+ chmod a+rwx .
288+ chown notroot ~ .
289+ su notroot -c '
290+ yay -Syu --noconfirm
291+ yay -S --noconfirm \
292+ python-build \
293+ python-installer \
294+ python-setuptools \
295+ rhash
296+ mkdir -p "$HOME"/.ssh/
297+ pushd "$HOME"/.ssh/
298+ echo "${AUR_SSH:?ssh key missing}" > aur
299+ chmod 0600 aur
300+ chmod 0700 .
301+ file aur
302+ popd
303+ '
304+ ls -la
305+ env :
306+ AUR_SSH : ${{ secrets.AUR_SSH }}
307+
308+ - name : Checkout the AUR repository
309+ run : |
310+ GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no -i '$HOME'/.ssh/aur" \
311+ sudo -u notroot git clone ssh://aur@aur.archlinux.org/python-ext4.git .
312+
313+ - name : Download test.ext4
314+ uses : actions/download-artifact@v8
315+ with :
316+ name : test.ext4
317+ path : .
318+
319+ - name : Update PKGBUILD
320+ run : |
321+ su notroot -c '
322+ tar czvf test-images.tar.gz test*.ext4*
323+ sed -i "s|pkgver=.*|pkgver=$version|" PKGBUILD
324+ updpkgsums PKGBUILD
325+ makepkg --printsrcinfo > .SRCINFO
326+ git add -f PKGBUILD .SRCINFO
327+ git config --local user.email 'nathaniel.vandiepen@gmail.com'
328+ git config --local user.name 'Nathaniel van Diepen'
329+ git commit -m 'Update to $version'
330+ git show
331+ '
332+ env :
333+ # version: ${{ github.ref_name }}
334+ version : 1.3.2
335+
336+ - name : Test PKGBUILD
337+ run : |
338+ sudo -u notroot makepkg \
339+ --noconfirm \
340+ --syncdeps \
341+ --install
342+
343+ # - name: Push PKGBUILD
344+ # run: sudo -u notroot git push
345+ # env:
346+ # GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no -i ~/.ssh/aur"
0 commit comments