From 12dc31d95a692625188c67254a6191f495d5308f Mon Sep 17 00:00:00 2001 From: Mitsuba100 Date: Tue, 14 Apr 2026 21:55:47 +0200 Subject: [PATCH] Update .github/workflows/update-repo.yml --- .github/workflows/update-repo.yml | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/.github/workflows/update-repo.yml b/.github/workflows/update-repo.yml index 64b59d1..711c47f 100644 --- a/.github/workflows/update-repo.yml +++ b/.github/workflows/update-repo.yml @@ -23,29 +23,27 @@ jobs: - name: Build and Sign Repository run: | cd x86_64 - rm -f hyprarch-repo.db* hyprarch-repo.files* + rm -f hyprarch-repo.db* hyprarch-repo.files* *.sig gpg --export --armor 236328A7F2C2001E > pubkey.gpg - # --- FIX: DETACHED BINARY SIGNATURES --- + # Force binary output using the -o flag for pkg in *.pkg.tar.zst; do - echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --batch --yes --pinentry-mode loopback --local-user 236328A7F2C2001E --passphrase-fd 0 --no-armor --detach-sign "$pkg" + echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --batch --yes --pinentry-mode loopback --local-user 236328A7F2C2001E --passphrase-fd 0 --detach-sign -o "$pkg.sig" "$pkg" done python3 ~/build_db.py - # --- FIX: NO SYMLINKS, BINARY DB SIGNATURE --- - cp hyprarch-repo.db.tar.gz hyprarch-repo.db - cp hyprarch-repo.db.tar.gz hyprarch-repo.files - echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --batch --yes --pinentry-mode loopback --local-user 236328A7F2C2001E --passphrase-fd 0 --no-armor --detach-sign hyprarch-repo.db + # Force binary output for the DB signature + echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --batch --yes --pinentry-mode loopback --local-user 236328A7F2C2001E --passphrase-fd 0 --detach-sign -o hyprarch-repo.db.sig hyprarch-repo.db + cp hyprarch-repo.db.sig hyprarch-repo.db.tar.gz.sig - name: Generate Subfolder Index run: | cd x86_64 echo "Index of /x86_64/" > index.html - echo "

Index of /x86_64/


" >> index.html
-          echo "../" >> index.html
+          echo "

Index of /x86_64/


../" >> index.html
           for file in *; do
             if [[ "$file" != "index.html" ]]; then
               size=$(du -sh "$file" | cut -f1)
@@ -65,9 +63,7 @@ jobs:
               
           
@@ -89,13 +85,9 @@ jobs:
 
       - name: Deploy and Fix Permissions
         run: |
-          # 1. Clean destination
-          rm -rf /var/www/hyprarch-repo/x86_64/*
-          mkdir -p /var/www/hyprarch-repo/x86_64
-          
-          # 2. Copy files
-          cp -rf . /var/www/hyprarch-repo/
-          
-          # 3. Ensure Nginx (www-data) can read them
+          # Use sudo for the cleanup and move if permissions are sticky
+          sudo rm -rf /var/www/hyprarch-repo/x86_64/*
+          sudo mkdir -p /var/www/hyprarch-repo/x86_64
+          sudo cp -rf . /var/www/hyprarch-repo/
           sudo chown -R stui:www-data /var/www/hyprarch-repo
           sudo chmod -R 755 /var/www/hyprarch-repo
\ No newline at end of file