aur automatization
This commit is contained in:
parent
66e4857219
commit
fa497acef7
47
.forgejo/workflows/aur.yaml
Normal file
47
.forgejo/workflows/aur.yaml
Normal file
@ -0,0 +1,47 @@
|
||||
name: AUR Sync
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
aur-sync:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: archlinux:latest
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pacman -Syu --noconfirm git openssh binutils
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.AUR_SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
ssh-keyscan -t ed25519 aur.archlinux.org >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global user.name "nekohepott"
|
||||
git config --global user.email "nekohepott@larpdhq.org"
|
||||
|
||||
- name: Sync to AUR
|
||||
run: |
|
||||
git clone ssh://aur@aur.archlinux.org/gogofetch-git.git /tmp/aur
|
||||
|
||||
sudo -u nobody makepkg --printsrcinfo > .SRCINFO
|
||||
|
||||
cp PKGBUILD .SRCINFO /tmp/aur/
|
||||
|
||||
cd /tmp/aur
|
||||
if [[ -n $(git status -s) ]]; then
|
||||
git add PKGBUILD .SRCINFO
|
||||
git commit -m "Update from Codeberg CI: ${GITHUB_SHA::7}"
|
||||
git push
|
||||
else
|
||||
echo "No changes to commit"
|
||||
fi
|
||||
Loading…
Reference in New Issue
Block a user