Secrets and Variables
Configure repository and organization workflow credentials, contexts, precedence, and bot permissions.
Use Actions secrets for credentials and other sensitive values. Use Actions variables for non-sensitive configuration that administrators may inspect later.
| Type | Storage and display | Workflow context |
|---|---|---|
| Secret | Encrypted; the saved value cannot be viewed again | secrets.NAME |
| Variable | Stored as configuration; visible to administrators | vars.NAME |
Repository credentials
Open a repository and go to Settings > Actions > Secrets or Settings > Actions > Variables. Repository credentials apply only to that repository and take precedence over organization credentials with the same name.
Repository credential names must:
- begin with an uppercase letter;
- contain only uppercase letters, digits, and underscores;
- be at most 256 characters;
- not begin with
GITHUB_.
For example, use NPM_TOKEN, DEPLOY_ENV, or SIGNING_KEY.
Organization credentials
Organization administrators can create shared secrets and variables from the organization's Settings > Actions pages.
Organization access can be set to:
- All repositories; or
- Private repositories.
The dashboard currently displays Selected repositories, but creating a credential with that access mode is not supported. Choose all or private repositories.
Use values in a workflow
Reference values through their GitHub Actions-compatible contexts and map them into the environment only where needed:
jobs:
publish:
runs-on: ubuntu-latest
env:
DEPLOY_ENV: ${{ vars.DEPLOY_ENV }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm publishAvoid placing secret values in workflow YAML, command arguments that will be printed, artifact names, or generated files that are uploaded.
Precedence
When the same name is available from several sources, Trylle applies this order from lowest to highest priority:
- Organization credential.
- Repository credential.
- Runtime
GITHUB_TOKENfor the reserved token name.
Repository variables and secrets retain their explicit type when they are passed to the runner.
Manage repository credentials from the CLI
List metadata without exposing secret values:
try actions variable list -R OWNER/NAME
try actions secret list -R OWNER/NAMESet a non-sensitive variable directly:
try actions variable set DEPLOY_ENV production -R OWNER/NAMEKeep a secret value out of shell history by placing it in an existing environment variable and referring to that variable in the command:
try actions secret set NPM_TOKEN "$SECRET_VALUE" -R OWNER/NAME
unset SECRET_VALUERe-list the credential metadata after a change. Saved secret values remain hidden.
Organization credential limitations
Use secret-like names for organization secrets
Organization credentials currently reach the runner through a flattened environment map. At runtime, a name is classified as secret when it contains TOKEN, SECRET, or PASSWORD, or ends in _KEY. Until explicit organization credential kinds are preserved through the complete runtime path, use one of those forms for sensitive organization values or prefer a repository secret.
For example, SIGNING_KEY and DEPLOY_TOKEN receive secret-context and log-masking treatment. A sensitive organization value named only SIGNING_CERT may be treated as a variable, while a non-sensitive organization variable named TOKEN_FORMAT may be treated as a secret.
Organization variables are injected into the runner, but they are not available during the earlier runner-selection phase. If runs-on depends on a variable, define that variable at repository scope:
jobs:
build:
runs-on: ${{ vars.RUNNER_LABEL }}
steps:
- run: uname -aRuntime token and API URL
Each job receives a repository-bound GITHUB_TOKEN. Compatible tools should use it with GITHUB_API_URL or the github.api_url expression, both of which point to Trylle's GitHub-compatible API.
jobs:
inspect:
runs-on: ubuntu-latest
steps:
- run: >-
curl --fail-with-body
--header "Authorization: Bearer $TRYLLE_TOKEN"
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY"
env:
TRYLLE_TOKEN: ${{ secrets.GITHUB_TOKEN }}The runtime token overrides any organization or repository value of the same name.
Job bot permissions
A workflow job can select an installed Trylle bot using a static bot slug. The permissions block limits that bot's installed scopes for the job:
jobs:
release:
bot: release-bot
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- run: ./scripts/publish-release.shBot selection cannot come from an expression or matrix. Jobs without bot act as the event actor, and permissions does not provide general GitHub-style least-privilege semantics for those jobs. See GitHub Actions compatibility.