19
19
* [ Workflow] ( #workflow )
20
20
* [ Sign commits] ( #sign-commits )
21
21
* [ Use a subkey] ( #use-a-subkey )
22
+ * [ Set key's trust level] ( #set-keys-trust-level )
22
23
* [ Customizing] ( #customizing )
23
24
* [ inputs] ( #inputs )
24
25
* [ outputs] ( #outputs )
76
77
uses : actions/checkout@v3
77
78
-
78
79
name : Import GPG key
79
- id : import_gpg
80
80
uses : crazy-max/ghaction-import-gpg@v5
81
81
with :
82
82
gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
@@ -139,7 +139,6 @@ jobs:
139
139
uses: actions/checkout@v3
140
140
-
141
141
name: Import GPG key
142
- id: import_gpg
143
142
uses: crazy-max/ghaction-import-gpg@v5
144
143
with:
145
144
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
@@ -164,39 +163,76 @@ sub ed25519 2021-09-24 [S]
164
163
165
164
You can use the subkey with signing capability whose fingerprint is `C17D11ADF199F12A30A0910F1F80449BE0B08CB8`.
166
165
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
+
167
200
# # Customizing
168
201
169
202
# ## inputs
170
203
171
204
Following inputs can be used as `step.with` keys
172
205
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
+ >
187
223
> `git_user_signingkey` needs to be enabled for `git_commit_gpgsign`, `git_tag_gpgsign`,
188
224
> `git_push_gpgsign`, `git_committer_name`, `git_committer_email` inputs.
189
225
190
226
# ## outputs
191
227
192
228
Following outputs are available
193
229
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 |
200
236
201
237
# # Contributing
202
238
0 commit comments