actions

Manage the targeted repository’s Actions secrets and workflow permissions.

Added in version 1.1.0.

Part of the github resource type: states operate on the repository the state run was dispatched to, so there is no repo_name/owner parameter. The profile parameter defaults to the profile named in the resource declaration.

saltext.github.resources.github.states.actions.secret_present(name, value=None, force=False, profile=None)[source]

Ensure an Actions secret is present in the targeted repository.

Secret values are write-only in the GitHub API, so this state cannot detect value drift. By default, an existing secret is left untouched. Set force to push the value on every run.

name

Name of the secret. GitHub treats secret names case-insensitively.

value

Plaintext secret value. It is encrypted to the repository public key before leaving the minion and never appears in the state output. Required when the secret does not exist yet or force is set.

force

Push the value even when the secret already exists. Defaults to false.

profile

Profile configuration name to use. Defaults to the resource declaration’s profile.

saltext.github.resources.github.states.actions.secret_absent(name, profile=None)[source]

Ensure an Actions secret is absent from the targeted repository.

name

Name of the secret. GitHub treats secret names case-insensitively.

profile

Profile configuration name to use. Defaults to the resource declaration’s profile.

saltext.github.resources.github.states.actions.workflow_permissions_managed(name, default_workflow_permissions=None, can_approve_pull_request_reviews=None, profile=None)[source]

Manage the default workflow permissions granted to the GITHUB_TOKEN in the targeted repository.

name

State name (the repository is implied by the resource).

default_workflow_permissions

Default permissions for the GITHUB_TOKEN, either read or write.

can_approve_pull_request_reviews

Allow GitHub Actions to approve pull requests.

profile

Profile configuration name to use. Defaults to the resource declaration’s profile.