Fix DB format and update indices in workflow

This commit is contained in:
Mitsuba100
2026-03-23 15:11:57 +01:00
committed by GitHub
parent 2e142a3d84
commit cb1878ce6c

View File

@@ -22,11 +22,17 @@ jobs:
- name: Update Repository Database
run: |
cd x86_64
# Rebuild the DB
tar -cvzf hyprarch-repo.db.tar.gz *.pkg.tar.zst
cp hyprarch-repo.db.tar.gz hyprarch-repo.files.tar.gz
# Download a repo-add script that works on Ubuntu
curl -L https://raw.githubusercontent.com/anthraxx/pacman-repo-add/master/repo-add -o repo-add
chmod +x repo-add
# Fix symlinks for GitHub Pages
# Use the real tool to build the database pacman expects
./repo-add hyprarch-repo.db.tar.gz *.pkg.tar.zst
# Clean up the tool so it doesn't get pushed to the repo
rm repo-add
# Fix symlinks for GitHub Pages (actual files instead of symlinks)
rm -f hyprarch-repo.db hyprarch-repo.files
cp hyprarch-repo.db.tar.gz hyprarch-repo.db
cp hyprarch-repo.files.tar.gz hyprarch-repo.files
@@ -88,7 +94,7 @@ jobs:
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
if ! git diff-index --quiet HEAD; then
git commit -m "Automated database and hybrid index update"
git commit -m "Fixed DB format and updated indices"
git push
else
echo "Nothing to change."