Refactor update-repo workflow for Ubuntu compatibility
Updated the workflow to use a custom repo-add script instead of the package manager's repo-add. Removed unnecessary steps and adjusted commands for Ubuntu compatibility.
This commit is contained in:
22
.github/workflows/update-repo.yml
vendored
22
.github/workflows/update-repo.yml
vendored
@@ -9,9 +9,6 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
update-db:
|
update-db:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: archlinux:latest
|
|
||||||
options: --user root # Ensure we are running as root to match container ownership
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@@ -19,21 +16,22 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Setup repo-add tools
|
||||||
run: |
|
run: |
|
||||||
pacman -Sy --noconfirm pacman git
|
# Download the standalone repo-add script from Arch Linux
|
||||||
|
sudo apt-get update && sudo apt-get install -y bsdtar
|
||||||
- name: Fix Git Ownership
|
curl -L https://gitlab.archlinux.org/pacman/pacman/-/raw/master/scripts/repo-add.sh.in -o repo-add
|
||||||
run: |
|
chmod +x repo-add
|
||||||
# This tells Git to ignore ownership checks for every folder on this runner
|
# Provide a dummy library path so it runs on Ubuntu
|
||||||
git config --global --add safe.directory '*'
|
sed -i 's|@pkgdatadir@|/usr/share/pacman|g' repo-add
|
||||||
|
|
||||||
- name: Update Repository Database
|
- name: Update Repository Database
|
||||||
run: |
|
run: |
|
||||||
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 "Updating database..."
|
||||||
repo-add hyprarch-repo.db.tar.gz *.pkg.tar.zst
|
# Run our downloaded repo-add
|
||||||
|
../repo-add hyprarch-repo.db.tar.gz *.pkg.tar.zst
|
||||||
|
|
||||||
# Break symlinks for GitHub Pages
|
# Break symlinks for GitHub Pages
|
||||||
rm -f hyprarch-repo.db hyprarch-repo.files
|
rm -f hyprarch-repo.db hyprarch-repo.files
|
||||||
|
|||||||
Reference in New Issue
Block a user