ShipSecrets and variables

Secrets and variables

Keep credentials out of your repository: repository secrets for pipelines, variables for apps.

Guide1 min read

Credentials never belong in a repository. CodePinion keeps them in two places, depending on who needs them.

Repository secrets, for pipelines

Add secrets under the repository's Secrets tab. A pipeline job reads only the ones it lists:

YAML
jobs:
  publish:
    image: node
    secrets: [NPM_TOKEN, SENTRY_AUTH_TOKEN]
    steps:
      - run: npm publish
  • Names use capital letters, digits and underscores, and cannot start with a digit: NPM_TOKEN, not npm-token.
  • Each listed secret arrives as an environment variable of the same name.
  • Secret values are masked in job logs.
  • A job that lists a secret the repository doesn't have fails rather than running without it.
  • Pipelines started from a fork never receive secrets.

There is no step-level env:. For a value that isn't secret, set it inline in the command: NODE_ENV=production npm run build.

App variables, for running apps

A hosted app's environment variables live on its Variables tab. They are available while the app is built as well as while it runs.

Attaching an add-on can add variables for you, such as DATABASE_URL. Those are managed by CodePinion and kept up to date when credentials rotate, so you cannot overwrite them by hand. See Add-ons.