feat(ci): auto-deploy to aur
This commit is contained in:
parent
8bcfe7a9b1
commit
811374782b
1 changed files with 31 additions and 0 deletions
31
.github/workflows/aur.yml
vendored
Normal file
31
.github/workflows/aur.yml
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
name: Update AUR
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths: [PKGBUILD]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
container: archlinux:base-devel
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- run: makepkg --printsrcinfo > .SRCINFO
|
||||
|
||||
- name: Push to AUR
|
||||
env:
|
||||
AUR_SSH_KEY: ${{ secrets.AUR_SSH_KEY }}
|
||||
run: |
|
||||
pacman -Sy --noconfirm openssh git
|
||||
mkdir -p ~/.ssh
|
||||
echo "$AUR_SSH_KEY" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue