CreateOrUpdateRepoSecret creates or updates a repository secret with an encrypted value. GitHub API docs: https://docs.github.com/rest/actions/secrets?apiVersion=2022-11-28#create-or-update-a-repository-secret meta:operation PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}
(ctx context.Context, owner, repo string, eSecret *EncryptedSecret)
| 247 | // |
| 248 | //meta:operation PUT /repos/{owner}/{repo}/actions/secrets/{secret_name} |
| 249 | func (s *ActionsService) CreateOrUpdateRepoSecret(ctx context.Context, owner, repo string, eSecret *EncryptedSecret) (*Response, error) { |
| 250 | if eSecret == nil { |
| 251 | return nil, errors.New("encrypted secret must be provided") |
| 252 | } |
| 253 | |
| 254 | url := fmt.Sprintf("repos/%v/%v/actions/secrets/%v", owner, repo, eSecret.Name) |
| 255 | return s.putSecret(ctx, url, eSecret) |
| 256 | } |
| 257 | |
| 258 | // CreateOrUpdateOrgSecret creates or updates an organization secret with an encrypted value. |
| 259 | // |