Refactor: fix gpg agent condition
This commit is contained in:
13
action.yaml
13
action.yaml
@@ -53,7 +53,8 @@ runs:
|
||||
eval $(gpg-agent --daemon) && \
|
||||
echo "${{ inputs.gpg-password }}" | \
|
||||
/usr/lib/gnupg/gpg-preset-passphrase --preset "${{ inputs.gpg-keygrip }}" && \
|
||||
makepkg -sc --needed --noconfirm --sign && \
|
||||
makepkg -sc --needed --noconfirm --sign
|
||||
|
||||
killall -u "$(id -un)" gpg-agent || true
|
||||
else
|
||||
makepkg -sc --needed --noconfirm
|
||||
@@ -79,16 +80,14 @@ runs:
|
||||
- name: Add pkgs to repo db
|
||||
run: |
|
||||
if [[ "${{ inputs.gpg-password }}" != 'none' ]]; then
|
||||
eval $(gpg-agent --daemon)
|
||||
eval $(gpg-agent --daemon) && \
|
||||
echo "${{ inputs.gpg-password }}" | \
|
||||
/usr/lib/gnupg/gpg-preset-passphrase --preset "${{ inputs.gpg-keygrip }}"
|
||||
|
||||
/usr/lib/gnupg/gpg-preset-passphrase --preset "${{ inputs.gpg-keygrip }}" && \
|
||||
repo-add --verify --sign \
|
||||
"repo/${{ inputs.repo-name }}.db.tar.gz" *.pkg.tar.zst
|
||||
|
||||
"repo/${{ inputs.repo-name }}.db.tar.gz" *.pkg.tar.zst && \
|
||||
mv *.pkg.tar.zst *.pkg.tar.zst.sig repo
|
||||
|
||||
killall -u "$(id -un)" gpg-agent
|
||||
killall -u "$(id -un)" gpg-agent || true
|
||||
else
|
||||
repo-add "repo/${{ inputs.repo-name }}.db.tar.zst" *.pkg.tar.zst
|
||||
mv *.pkg.tar.zst repo
|
||||
|
||||
Reference in New Issue
Block a user