>:| still not working
This commit is contained in:
12
.github/workflows/update-repo.yml
vendored
12
.github/workflows/update-repo.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
||||
- name: Update Repository Database
|
||||
run: |
|
||||
cd x86_64
|
||||
# Remove old DB and sig files for a clean build
|
||||
# Remove all old DB and sig files to ensure a 100% clean rebuild
|
||||
rm -f hyprarch-repo.db* hyprarch-repo.files*
|
||||
|
||||
mkdir -p db_temp
|
||||
@@ -37,13 +37,14 @@ jobs:
|
||||
gpg --detach-sign --batch --no-armor --local-user 236328A7F2C2001E "$pkg"
|
||||
|
||||
# 2. Extract specific metadata (Strict Cleaning)
|
||||
# This logic avoids grabbing comments like "# Generated by..."
|
||||
pkgname=$(bsdtar -xOf "$pkg" .PKGINFO | grep "^pkgname =" | cut -d' ' -f3)
|
||||
pkgver=$(bsdtar -xOf "$pkg" .PKGINFO | grep "^pkgver =" | cut -d' ' -f3)
|
||||
pkgdesc=$(bsdtar -xOf "$pkg" .PKGINFO | grep "^pkgdesc =" | cut -d' ' -f3- | sed "s/['\"]//g")
|
||||
|
||||
mkdir -p "db_temp/$pkgname-$pkgver"
|
||||
|
||||
# Manually construct the 'desc' file to avoid "unknown key" errors
|
||||
# Manually construct a clean 'desc' file for Pacman
|
||||
{
|
||||
echo "%NAME%"
|
||||
echo "$pkgname"
|
||||
@@ -69,7 +70,7 @@ jobs:
|
||||
} > "db_temp/$pkgname-$pkgver/desc"
|
||||
done
|
||||
|
||||
# 3. Compress the metadata into a real Arch DB
|
||||
# 3. Pack the database metadata
|
||||
cd db_temp
|
||||
tar -c * | gzip -9 > ../hyprarch-repo.db.tar.gz
|
||||
cd ..
|
||||
@@ -77,10 +78,11 @@ jobs:
|
||||
# 4. Sign the database itself
|
||||
gpg --detach-sign --batch --no-armor --local-user 236328A7F2C2001E hyprarch-repo.db.tar.gz
|
||||
|
||||
# 5. Finalize files
|
||||
# 5. Finalize files (Ensure both .db and .files are clean)
|
||||
cp hyprarch-repo.db.tar.gz hyprarch-repo.db
|
||||
cp hyprarch-repo.db.tar.gz.sig hyprarch-repo.db.sig
|
||||
cp hyprarch-repo.db.tar.gz hyprarch-repo.files
|
||||
cp hyprarch-repo.db.tar.gz hyprarch-repo.files.tar.gz
|
||||
rm -rf db_temp
|
||||
|
||||
- name: Generate Subfolder Index
|
||||
@@ -137,7 +139,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 "Final Fix: Clean Metadata and GPG Signed DB"
|
||||
git commit -m "Final Infrastructure Fix: Clean DB/Files and GPG Signing"
|
||||
git push
|
||||
else
|
||||
echo "Nothing to change."
|
||||
|
||||
Reference in New Issue
Block a user