name: Update Arch Repository on: push: paths: - 'x86_64/*.pkg.tar.zst' workflow_dispatch: jobs: update-db: runs-on: ubuntu-latest container: archlinux:latest # This ensures the container knows exactly where the workspace is defaults: run: working-directory: /__w/hyprarch-repo/hyprarch-repo steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 - name: Install Dependencies run: | pacman -Sy --noconfirm pacman git - name: Update Repository Database run: | # Explicitly trust the directory for the bot user git config --global --add safe.directory /__w/hyprarch-repo/hyprarch-repo cd x86_64 if ls *.pkg.tar.zst 1> /dev/null 2>&1; then echo "Updating database..." repo-add hyprarch-repo.db.tar.gz *.pkg.tar.zst # Break symlinks for GitHub Pages 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 else echo "No packages found." fi - name: Generate Package Index run: | echo "