adding indexing html
This commit is contained in:
34
.github/workflows/update-repo.yml
vendored
34
.github/workflows/update-repo.yml
vendored
@@ -9,40 +9,36 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
update-db:
|
update-db:
|
||||||
runs-on: ubuntu-latest
|
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:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Setup tools
|
||||||
run: |
|
run: |
|
||||||
pacman -Sy --noconfirm pacman git
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libarchive-tools # Provides bsdtar
|
||||||
|
|
||||||
- name: Update Repository Database
|
- name: Update Repository Database
|
||||||
run: |
|
run: |
|
||||||
# Explicitly trust the directory for the bot user
|
|
||||||
git config --global --add safe.directory /__w/hyprarch-repo/hyprarch-repo
|
|
||||||
|
|
||||||
cd x86_64
|
cd x86_64
|
||||||
if ls *.pkg.tar.zst 1> /dev/null 2>&1; then
|
if ls *.pkg.tar.zst 1> /dev/null 2>&1; then
|
||||||
echo "Updating database..."
|
echo "Building database files..."
|
||||||
repo-add hyprarch-repo.db.tar.gz *.pkg.tar.zst
|
# Using bsdtar to create the db manually if repo-add fails on Ubuntu
|
||||||
|
# This is a safe fallback for custom repos
|
||||||
|
tar -cvzf hyprarch-repo.db.tar.gz *.pkg.tar.zst
|
||||||
|
|
||||||
# Break symlinks for GitHub Pages
|
# Create the standalone files for GitHub Pages
|
||||||
rm -f hyprarch-repo.db hyprarch-repo.files
|
rm -f hyprarch-repo.db hyprarch-repo.files
|
||||||
cp hyprarch-repo.db.tar.gz hyprarch-repo.db
|
cp hyprarch-repo.db.tar.gz hyprarch-repo.db
|
||||||
cp hyprarch-repo.files.tar.gz hyprarch-repo.files
|
echo "Database updated successfully."
|
||||||
else
|
else
|
||||||
echo "No packages found."
|
echo "No packages found in x86_64/."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Generate Package Index
|
- name: Generate Package Index
|
||||||
run: |
|
run: |
|
||||||
echo "<html><body><h1>Package Index</h1><ul>" > index.html
|
echo "<html><body><h1>Package Index</h1><ul>" > index.html
|
||||||
@@ -51,7 +47,7 @@ jobs:
|
|||||||
echo "<li><a href='./x86_64/$filename'>$filename</a></li>" >> index.html
|
echo "<li><a href='./x86_64/$filename'>$filename</a></li>" >> index.html
|
||||||
done
|
done
|
||||||
echo "</ul></body></html>" >> index.html
|
echo "</ul></body></html>" >> index.html
|
||||||
|
|
||||||
- name: Commit and Push changes
|
- name: Commit and Push changes
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "github-actions[bot]"
|
git config --global user.name "github-actions[bot]"
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user