Skip to content

AUR check update #43742

AUR check update

AUR check update #43742

name: AUR check update
on:
schedule:
- cron: '19,49 * * * *'
jobs:
check-update:
runs-on: ubuntu-latest
container: archlinux:latest
strategy:
fail-fast: true
name: checker
steps:
- name: Install requirements
shell: bash
run: |
pacman-key --init
pacman --noconfirm --needed -Syu binutils git python pyalpm python-aiohttp python-aiofiles
- uses: actions/checkout@v3
- name: Add safe directory
shell: bash
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Initialize submodules
shell: bash
run: |
cd "$GITHUB_WORKSPACE"
git fetch
git submodule update --init
- name: Check updates
shell: bash
run: |
sed -i -e '/as root is not allowed/i \ \ \ \ \ \ \ \ true' -e '/as root is not allowed/,+2d' /usr/bin/makepkg
./utils/aur/check-aur-update.py --check-deps --parse-pkgbuild ./utils/parse-pkgbuild.sh repo
- name: Push changes
id: get_env
shell: bash
run: |
git add .
if [ ! -z "$(git --no-pager diff --staged)" ]; then
git config --global user.name 'github-actions[bot]'
git config --global user.email '<41898282+github-actions[bot]@users.noreply.github.com>'
git commit -s -m "Auto update aur repository $(date +%Y%m%d%H%M)$(echo -e '\n\nUpdate packages:')$(git diff --name-only | sed -e 's|^repo/|* |')" -a
git push
fi