try copying files into the aur repository

This commit is contained in:
Dominic 2024-12-03 14:04:04 +01:00
parent 54598a126a
commit 70b94c15c5
Signed by: msrd0
GPG key ID: AAF7C8430CA3345D

View file

@ -50,6 +50,8 @@ runs:
pkgbase='${{inputs.pkgbase}}'
[ -n "$pkgbase" ] || pkgbase="$( (. PKGBUILD && printf '%s' "$pkgbase") )"
[ -n "$pkgbase" ] || pkgbase="$( (. PKGBUILD && printf '%s' "$pkgname") )"
[ -n "$pkgver" ] || pkgver="$( (. PKGBUILD && printf '%s' "$pkgver") )"
[ -n "$pkgrel" ] || pkgver="$( (. PKGBUILD && printf '%s' "$pkgrel") )"
[ -n "$pkgbase" ] || \
( echo "Failed to determine pkgbase"; exit 1 )
@ -57,5 +59,14 @@ runs:
( echo "Git ref is neither main nor master, aborting"; exit 1 ) || exit 0
export GIT_SSH_COMMAND='ssh -i ~/.ssh/ssh_key -o IdentitiesOnly=yes'
git remote add aur "ssh://aur@aur.archlinux.org/$pkgbase.git"
git push aur "${{github.ref_name}}:master"
git clone "ssh://aur@aur.archlinux.org/$pkgbase.git" aur
find aur -maxdepth 1 -type f | (set -x; while read file; do rm -f "$file"; done)
find . -maxdepth 1 -type f | (set -x; while read file; do cp "$file" aur; done)
cd aur
git add .
git config user.name "${{github.event.head_commit.committer.name}}"
git config user.email "${{github.event.head_commit.committer.email}}"
git commit -m "$pkgbase $pkgver-$pkgrel (${{github.event.head_commit.url}})" \
--author "${{github.event.head_commit.author.name}} <${{github.event.head_commit.author.email}}>"
git show HEAD
echo git push aur "${{github.ref_name}}:master"