跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
Support

Create an org-level variable

POST
/orgs/{org}/actions/variables/{variablename}
curl --request POST \
--url https://gitea.example.com/api/v1/orgs/example/actions/variables/example \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "description": "example", "value": "example" }'
org
required
string

Name of the organization

variablename
required
string

Name of the variable

Media typeapplication/json

CreateVariableOption the option when creating variable

object
description

Description of the variable to create

string
value
required

Value of the variable to create

string
Examplegenerated
{
"description": "example",
"value": "example"
}

Successfully created the org-level variable

Media typeapplication/json

APIError is error format response

Media typeapplication/json
message
string
url
string

Variable name already exists.

Media typeapplication/json

APIError is error format response

Media typeapplication/json
message
string
url
string