ci: add AUR pkg updates PRs on release

This commit is contained in:
2024-09-15 18:49:42 +02:00
parent 9f32ce274b
commit c4a996c1e8
4 changed files with 35 additions and 5 deletions

View File

@@ -33,7 +33,37 @@ jobs:
tag: v${{ inputs.version }}
commit: ${{ github.sha }}
artifacts: builds/lidm-*
artifactsErrorsFailBuild: true
artifactErrorsFailBuild: true
body: Release notes not generated yet.
# TODO: get checksums and commit new AUR pkgbuilds
aur-update:
name: Update AUR pkgs
runs-on: ubuntu-24.04
container: archlinux:latest
permissions: write-all
needs: release
steps:
- run: pacman -Sy --noconfirm git github-cli base-devel pacman-contrib
- uses: actions/checkout@v4
- run: |
cd "assets/pkg/aur"
chown nobody:nobody . -R
su - -s /bin/bash nobody -c "$PWD/update-pkgs.sh ${{ inputs.version }}"
su - -s /bin/bash nobody -c "$PWD/test-makepkg.sh" # This will also update -git pkgver
chown $UID:$(id -g) . -R
- run: |
BRANCH=actions/update-aur-${{ inputs.version }}
git config --global --add safe.directory $GITHUB_WORKSPACE
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git checkout -b $BRANCH
git commit -am "Update AUR pkgs to v${{ inputs.version }}"
git push -u origin $BRANCH
gh pr create --head $BRANCH \
--title "[AUR update]: Bump to ${{ inputs.version }}" \
--body "*This PR was created automatically*"
env:
GH_TOKEN: ${{ github.token }}