sioyek-dev/.github/workflows/aur.yml
2026-02-18 18:03:30 -05:00

37 lines
1.1 KiB
YAML

name: Update AUR
on:
workflow_dispatch:
push:
branches: [main]
paths: [PKGBUILD]
jobs:
publish:
runs-on: ubuntu-latest
container: archlinux:base-devel
steps:
- run: pacman -Sy --noconfirm openssh git
- uses: actions/checkout@v4
- run: |
useradd -m builder
chown -R builder: .
su builder -c 'makepkg --printsrcinfo > .SRCINFO'
- name: Push to AUR
env:
AUR_SSH_KEY: ${{ secrets.AUR_SSH_KEY }}
run: |
mkdir -p /root/.ssh
echo "$AUR_SSH_KEY" > /root/.ssh/id_ed25519
chmod 600 /root/.ssh/id_ed25519
echo "aur.archlinux.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEuBKrPzbawxA/k2g6NcyV5jmqwJ2s+zpgZGZ7tpLIhd" >> /root/.ssh/known_hosts
git config --global safe.directory '*'
git config user.name "Barrett Ruth"
git config user.email "barrettruth@gmail.com"
git remote add aur ssh://aur@aur.archlinux.org/sioyek-dev.git
git add .SRCINFO
git diff --cached --quiet || git commit -m "update .SRCINFO"
git push aur HEAD:main