Skip to content

workflow.secret.set

Place a CI secret directly into its protected scope, never repo scope.

Maps FORGE_ADMIN_TOKEN to govern, FORGE_TOKEN to bot, and PYPI_TOKEN / UV_PUBLISH_TOKEN to pypi (respecting [ci.environments] overrides in workshop.toml). On GitHub, creates or locks the target environment to protected branches before storing the secret; on GitLab, marks the project CI variable protected: true; on Gitea, refuses plainly with mitigation steps.

fm workflow.secret.set <name> [--value=VALUE] [--environment=VALUE] [--from-env]
Parameter Type Default Description
<name> required CI secret name (e.g. FORGE_ADMIN_TOKEN, FORGE_TOKEN, PYPI_TOKEN)
--value=VALUE "" secret value; omitted prompts securely or reads --from-env
--environment=VALUE "" explicit protected environment name (defaults by secret role)
--from-env flag false read the secret value from the local environment variable

Example

$ fm workflow.secret.set <name> --from-env