Skip to content

Commit

Permalink
Change: Mark bash inputs as literal string
Browse files Browse the repository at this point in the history
Let bash not interpret the inputs. This fixes using passwords containing
special characters like `$`.
  • Loading branch information
bjoernricks committed Jan 16, 2024
1 parent 528b2e8 commit 0312a8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions signature/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ runs:
shell: bash
run: |
echo -e "${{ inputs.gpg-key }}" >> tmp.file
gpg --pinentry-mode loopback --passphrase ${{ inputs.gpg-passphrase }} --import tmp.file
gpg --pinentry-mode loopback --passphrase '${{ inputs.gpg-passphrase }}' --import tmp.file
rm tmp.file
- name: "Create a GPG signature"
shell: bash
run: |
if [ -z "${{ inputs.signature-file }}"]; then
gpg --pinentry-mode loopback --local-user ${{ inputs.gpg-fingerprint }} --yes --detach-sign --passphrase ${{ inputs.gpg-passphrase }} --armor ${{ inputs.file }}
gpg --pinentry-mode loopback --local-user '${{ inputs.gpg-fingerprint }}' --yes --detach-sign --passphrase '${{ inputs.gpg-passphrase }}' --armor '${{ inputs.file }}'
else
gpg --pinentry-mode loopback --local-user ${{ inputs.gpg-fingerprint }} --yes --detach-sign --passphrase ${{ inputs.gpg-passphrase }} --armor --output ${{ inputs.signature-file }} ${{ inputs.file }}
gpg --pinentry-mode loopback --local-user '${{ inputs.gpg-fingerprint }}' --yes --detach-sign --passphrase '${{ inputs.gpg-passphrase }}' --armor --output ${{ inputs.signature-file }} '${{ inputs.file }}'
fi

0 comments on commit 0312a8e

Please sign in to comment.