|
1 | 1 | --- |
2 | | -name: Delete a repository secret |
| 2 | +name: Create or update a repository secret |
3 | 3 | example: octokit.actions.createOrUpdateSecretForRepo({ owner, repo, secret_name }) |
4 | | -route: DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name} |
| 4 | +route: PUT /repos/{owner}/{repo}/actions/secrets/{secret_name} |
5 | 5 | scope: actions |
6 | 6 | type: API method |
7 | 7 | --- |
8 | 8 |
|
9 | | -# Delete a repository secret |
| 9 | +# Create or update a repository secret |
10 | 10 |
|
11 | 11 | **Deprecated:** This method has been renamed to actions.createOrUpdateRepoSecret |
12 | 12 |
|
13 | | -Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. |
| 13 | +Creates or updates a repository secret with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. |
| 14 | + |
| 15 | +Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. |
| 16 | + |
| 17 | +Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3. |
| 18 | + |
| 19 | +Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. |
| 20 | + |
| 21 | +Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. |
14 | 22 |
|
15 | 23 | ```js |
16 | 24 | octokit.actions.createOrUpdateSecretForRepo({ |
@@ -39,11 +47,21 @@ octokit.actions.createOrUpdateSecretForRepo({ |
39 | 47 | </td></tr> |
40 | 48 | <tr><td>secret_name</td><td>yes</td><td> |
41 | 49 |
|
| 50 | +</td></tr> |
| 51 | +<tr><td>encrypted_value</td><td>no</td><td> |
| 52 | + |
| 53 | +Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://developer.github.com/v3/actions/secrets/#get-a-repository-public-key) endpoint. |
| 54 | + |
| 55 | +</td></tr> |
| 56 | +<tr><td>key_id</td><td>no</td><td> |
| 57 | + |
| 58 | +ID of the key you used to encrypt the secret. |
| 59 | + |
42 | 60 | </td></tr> |
43 | 61 | <tr><td>name</td><td>no</td><td> |
44 | 62 |
|
45 | 63 | </td></tr> |
46 | 64 | </tbody> |
47 | 65 | </table> |
48 | 66 |
|
49 | | -See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/secrets/#delete-a-repository-secret). |
| 67 | +See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/secrets/#create-or-update-a-repository-secret). |
0 commit comments