LP-2725: plugin ci template & actions

This commit is contained in:
2023-12-26 11:53:21 +03:00
parent 627bd4e231
commit fb31170009
4 changed files with 266 additions and 0 deletions
+36
View File
@@ -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 }}