1919 * [ Workflow] ( #workflow )
2020 * [ Sign commits] ( #sign-commits )
2121 * [ Use a subkey] ( #use-a-subkey )
22+ * [ Set key's trust level] ( #set-keys-trust-level )
2223* [ Customizing] ( #customizing )
2324 * [ inputs] ( #inputs )
2425 * [ outputs] ( #outputs )
7677 uses : actions/checkout@v3
7778 -
7879 name : Import GPG key
79- id : import_gpg
8080 uses : crazy-max/ghaction-import-gpg@v5
8181 with :
8282 gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
@@ -139,7 +139,6 @@ jobs:
139139 uses: actions/checkout@v3
140140 -
141141 name: Import GPG key
142- id: import_gpg
143142 uses: crazy-max/ghaction-import-gpg@v5
144143 with:
145144 gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
@@ -164,39 +163,76 @@ sub ed25519 2021-09-24 [S]
164163
165164You can use the subkey with signing capability whose fingerprint is `C17D11ADF199F12A30A0910F1F80449BE0B08CB8`.
166165
166+ # ## Set key's trust level
167+
168+ With the `trust_level` input, you can specify the trust level of the GPG key.
169+
170+ Valid values are :
171+ * `1`: unknown
172+ * `2`: never
173+ * `3`: marginal
174+ * `4`: full
175+ * `5`: ultimate
176+
177+ ` ` ` yaml
178+ name: import-gpg
179+
180+ on:
181+ push:
182+ branches: master
183+
184+ jobs:
185+ import-gpg:
186+ runs-on: ubuntu-latest
187+ steps:
188+ -
189+ name: Checkout
190+ uses: actions/checkout@v3
191+ -
192+ name: Import GPG key
193+ uses: crazy-max/ghaction-import-gpg@v5
194+ with:
195+ gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
196+ passphrase: ${{ secrets.PASSPHRASE }}
197+ trust_level: 5
198+ ` ` `
199+
167200# # Customizing
168201
169202# ## inputs
170203
171204Following inputs can be used as `step.with` keys
172205
173- | Name | Type | Description |
174- |---------------------------------------|---------|------------------------------------------------|
175- | `gpg_private_key` | String | GPG private key exported as an ASCII armored version or its base64 encoding (**required**) |
176- | `passphrase` | String | Passphrase of the GPG private key |
177- | `git_config_global` | Bool | Set Git config global (default `false`) |
178- | `git_user_signingkey` | Bool | Set GPG signing keyID for this Git repository (default `false`) |
179- | `git_commit_gpgsign` | Bool | Sign all commits automatically. (default `false`) |
180- | `git_tag_gpgsign` | Bool | Sign all tags automatically. (default `false`) |
181- | `git_push_gpgsign` | String | Sign all pushes automatically. (default `if-asked`) |
182- | `git_committer_name` | String | Set commit author's name (defaults to the name associated with the GPG key) |
183- | `git_committer_email` | String | Set commit author's email (defaults to the email address associated with the GPG key) |
184- | `workdir` | String | Working directory (below repository root) (default `.`) |
185- | `fingerprint` | String | Specific fingerprint to use (subkey) |
186-
206+ | Name | Type | Description |
207+ |-----------------------|--------|--------------------------------------------------------------------------------------------|
208+ | `gpg_private_key` | String | GPG private key exported as an ASCII armored version or its base64 encoding (**required**) |
209+ | `passphrase` | String | Passphrase of the GPG private key |
210+ | `trust_level` | String | Set key's trust level |
211+ | `git_config_global` | Bool | Set Git config global (default `false`) |
212+ | `git_user_signingkey` | Bool | Set GPG signing keyID for this Git repository (default `false`) |
213+ | `git_commit_gpgsign` | Bool | Sign all commits automatically. (default `false`) |
214+ | `git_tag_gpgsign` | Bool | Sign all tags automatically. (default `false`) |
215+ | `git_push_gpgsign` | String | Sign all pushes automatically. (default `if-asked`) |
216+ | `git_committer_name` | String | Set commit author's name (defaults to the name associated with the GPG key) |
217+ | `git_committer_email` | String | Set commit author's email (defaults to the email address associated with the GPG key) |
218+ | `workdir` | String | Working directory (below repository root) (default `.`) |
219+ | `fingerprint` | String | Specific fingerprint to use (subkey) |
220+
221+ > **Note**
222+ >
187223> `git_user_signingkey` needs to be enabled for `git_commit_gpgsign`, `git_tag_gpgsign`,
188224> `git_push_gpgsign`, `git_committer_name`, `git_committer_email` inputs.
189225
190226# ## outputs
191227
192228Following outputs are available
193229
194- | Name | Type | Description |
195- |---------------|---------| ---------------------------------------|
196- | `fingerprint` | String | Fingerprint of the GPG key (recommended as [user ID](https://www.gnupg.org/documentation/manuals/gnupg/Specify-a-User-ID.html)) |
197- | `keyid` | String | Low 64 bits of the X.509 certificate SHA-1 fingerprint |
198- | `name` | String | Name associated with the GPG key |
199- | `email` | String | Email address associated with the GPG key |
230+ | Name | Type | Description |
231+ |---------------|--------|------------------------------------------------------------------------------------------ ---------------------------------------|
232+ | `fingerprint` | String | Fingerprint of the GPG key (recommended as [user ID](https://www.gnupg.org/documentation/manuals/gnupg/Specify-a-User-ID.html)) |
233+ | `keyid` | String | Low 64 bits of the X.509 certificate SHA-1 fingerprint |
234+ | `name` | String | Name associated with the GPG key |
235+ | `email` | String | Email address associated with the GPG key |
200236
201237# # Contributing
202238
0 commit comments