From 31ddfeffff441c7ade69d6ecf842a4a297fd5704 Mon Sep 17 00:00:00 2001 From: Mitsuba100 Date: Mon, 23 Mar 2026 16:20:58 +0100 Subject: [PATCH] adding instructions on how to add gpg key --- .github/workflows/update-repo.yml | 50 ++++++++++++++++++------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/.github/workflows/update-repo.yml b/.github/workflows/update-repo.yml index 953d885..28c5651 100644 --- a/.github/workflows/update-repo.yml +++ b/.github/workflows/update-repo.yml @@ -25,7 +25,6 @@ jobs: echo "ERROR: GPG_PRIVATE_KEY secret is empty!" exit 1 fi - # Save key to a temp file to avoid "invalid option" command-line errors echo "${{ secrets.GPG_PRIVATE_KEY }}" > private_key.gpg gpg --batch --import private_key.gpg rm private_key.gpg @@ -34,15 +33,15 @@ jobs: run: | cd x86_64 rm -f hyprarch-repo.db* hyprarch-repo.files* - mkdir -p db_temp - - # Define passphrase variable from secrets - PASS="${{ secrets.GPG_PASSPHRASE }}" + export GPG_TTY=$(tty) + + # Export public key to the folder so it is accessible via URL + gpg --export --armor 236328A7F2C2001E > pubkey.gpg for pkg in *.pkg.tar.zst; do - # 1. Sign the package - echo "$PASS" | gpg --batch --yes --pinentry-mode loopback --local-user 236328A7F2C2001E --passphrase-fd 0 --detach-sign --no-armor "$pkg" + # 1. Sign the package file + echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --batch --yes --pinentry-mode loopback --local-user 236328A7F2C2001E --passphrase-fd 0 --detach-sign --no-armor "$pkg" # 2. Extract Metadata pkgname=$(bsdtar -xOf "$pkg" .PKGINFO | grep "^pkgname =" | cut -d' ' -f3) @@ -71,7 +70,7 @@ jobs: echo "$(bsdtar -xOf "$pkg" .PKGINFO | grep "^size =" | cut -d' ' -f3)" echo "" echo "%PGPSIG%" - echo "$PASS" | gpg --batch --yes --pinentry-mode loopback --local-user 236328A7F2C2001E --passphrase-fd 0 --detach-sign --stdout --no-armor "$pkg" | base64 | tr -d '\n' + echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --batch --yes --pinentry-mode loopback --local-user 236328A7F2C2001E --passphrase-fd 0 --detach-sign --stdout --no-armor "$pkg" | base64 | tr -d '\n' echo "" } > "db_temp/$pkgname-$pkgver/desc" done @@ -80,7 +79,7 @@ jobs: cd db_temp tar -c * | gzip -9 > ../hyprarch-repo.db.tar.gz cd .. - echo "$PASS" | gpg --batch --yes --pinentry-mode loopback --local-user 236328A7F2C2001E --passphrase-fd 0 --detach-sign --no-armor hyprarch-repo.db.tar.gz + echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --batch --yes --pinentry-mode loopback --local-user 236328A7F2C2001E --passphrase-fd 0 --detach-sign --no-armor hyprarch-repo.db.tar.gz # 4. Finalize cp hyprarch-repo.db.tar.gz hyprarch-repo.db @@ -114,25 +113,36 @@ jobs: body { font-family: sans-serif; margin: 40px; line-height: 1.6; background: #2e3440; color: #eceff4; } a { color: #88c0d0; text-decoration: none; } a:hover { text-decoration: underline; } - .container { max-width: 800px; margin: auto; background: #3b4252; padding: 20px; border-radius: 8px; } - h1 { border-bottom: 2px solid #4c566a; padding-bottom: 10px; } - pre { background: #2e3440; padding: 15px; border-radius: 5px; color: #ebcb8b; } + .container { max-width: 900px; margin: auto; background: #3b4252; padding: 20px; border-radius: 8px; } + h1 { border-bottom: 2px solid #4c566a; padding-bottom: 10px; color: #81a1c1; } + h2 { color: #a3be8c; margin-top: 30px; } + pre { background: #2e3440; padding: 15px; border-radius: 5px; color: #ebcb8b; overflow-x: auto; border: 1px solid #4c566a; } + code { color: #d08770; } + .step { background: #434c5e; padding: 10px 15px; border-left: 4px solid #81a1c1; margin: 10px 0; }

🚀 HyprArch Custom Repository

-

To use this repository, add the following to your /etc/pacman.conf:

+ +

1. Add the GPG Key

+

Run this command to trust the repository maintainer (Stuart Drew):

+
curl -s https://hyprarch-repo.stuple.net/x86_64/pubkey.gpg | sudo pacman-key -a - && sudo pacman-key --lsign-key 236328A7F2C2001E
+ +

2. Configure Pacman

+

Add the following to the bottom of /etc/pacman.conf:

[hyprarch-repo]
           SigLevel = Required DatabaseOptional
           Server = https://hyprarch-repo.stuple.net/$arch
-

📦 Available Packages

- -
-

Automated by GitHub Actions

+

3. Sync and Install

+
+ sudo pacman -Sy HyprArch-hyprland-git +
+ +
+

📁 Browse File Index

+

Automated by GitHub Actions • Last updated: '$(date)'

' > index.html @@ -143,7 +153,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 "Fix GPG import method and finalize signing" + git commit -m "Add GPG trust command to landing page" git push else echo "Nothing to change."