LP-2725: plugin ci template & actions
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
name: sign
|
||||
description: Sign file
|
||||
|
||||
inputs:
|
||||
private_key:
|
||||
required: true
|
||||
description: 'Private key'
|
||||
private_key_id:
|
||||
required: true
|
||||
description: 'Private key id'
|
||||
private_key_passphrase:
|
||||
required: true
|
||||
description: 'Private key passphrase'
|
||||
filepath:
|
||||
required: true
|
||||
description: 'Absolute or relative for workdir file path for sign'
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: ci/protect-sensitive
|
||||
shell: bash
|
||||
run: |
|
||||
echo ::add-mask::$INPUT_PRIVATE_KEY
|
||||
echo ::add-mask::$INPUT_PRIVATE_KEY_ID
|
||||
echo ::add-mask::$INPUT_PRIVATE_KEY_PASSPHRASE
|
||||
|
||||
- name: ci/import-private-key
|
||||
uses: crazy-max/ghaction-import-gpg@v6
|
||||
with:
|
||||
gpg_private_key: ${{ inputs.private_key }}
|
||||
passphrase: ${{ inputs.private_key_passphrase }}
|
||||
|
||||
- name: ci/sign
|
||||
shell: bash
|
||||
run: gpg -u ${{ inputs.private_key_id }} --verbose --personal-digest-preferences SHA256 --detach-sign ${{ inputs.filepath }}
|
||||
Reference in New Issue
Block a user