Replace PGP signing action with the bash script from the same
The PGP signing action ultimately just calls gpg with arguments set in https://github.com/actionhippie/gpgsign/blob/v1/overlay/usr/local/bin/entrypoint so its rather trivial to simply take the required arguments and put them directly in CI. This is substantially safer than the PGP signing action used as the action currently downloads, unverified and un-pinned, a docker image in order to access PGP.
This commit is contained in:
parent
8fd3497015
commit
b0abaa2571
1 changed files with 9 additions and 6 deletions
15
.github/workflows/prod-deploy.yml
vendored
15
.github/workflows/prod-deploy.yml
vendored
|
@ -21,12 +21,15 @@ jobs:
|
||||||
- name: Create tar.gz
|
- name: Create tar.gz
|
||||||
run: tar -czvf cinny-${{ steps.vars.outputs.tag }}.tar.gz dist
|
run: tar -czvf cinny-${{ steps.vars.outputs.tag }}.tar.gz dist
|
||||||
- name: Sign tar.gz
|
- name: Sign tar.gz
|
||||||
uses: actionhippie/gpgsign@4e28208b142cae93e1582401dcda1cf79e4f72c0
|
run: |
|
||||||
with:
|
echo '${{ secrets.GNUPG_KEY }}' | gpg --batch --import
|
||||||
private_key: ${{ secrets.GNUPG_KEY }}
|
# Sadly a few lines in the private key match a few lines in the public key,
|
||||||
passphrase: ${{ secrets.GNUPG_PASSPHRASE }}
|
# As a result just --export --armor gives us a few lines replaced with ***
|
||||||
detach_sign: true
|
# making it useless for importing the signing key. Instead, we dump it as
|
||||||
files: cinny-${{ steps.vars.outputs.tag }}.tar.gz
|
# non-armored and hex-encode it so that its printable.
|
||||||
|
echo "PGP Signing key, in raw PGP format in hex. Import with cat ... | xxd -r -p - | gpg --import"
|
||||||
|
gpg --export | xxd -p
|
||||||
|
echo '${{ secrets.GNUPG_PASSPHRASE }}' | gpg --batch --yes --pinentry-mode loopback --passphrase-fd 0 --armor --detach-sign cinny-${{ steps.vars.outputs.tag }}.tar.gz
|
||||||
- name: Upload tagged release
|
- name: Upload tagged release
|
||||||
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
|
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Reference in a new issue