admin:org
scope to use this endpoint.organization_actions_variables:write
organization permission to use this endpoint.curl --location --request PATCH 'https://api.github.com/orgs//actions/variables/' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "USERNAME",
"selected_repository_ids": [
1296269,
1296280
],
"value": "octocat",
"visibility": "selected"
}'
{}
visibility
is set to selected
.selected
means only the repositories specified by selected_repository_ids
can access the variable.