Skip to content

Custom Environment Variables

You can pass custom environment variables to Bucky workflows using the env input on your caller workflow. These are written to $GITHUB_ENV after checkout, making them available to all subsequent steps including inside composite actions.

Add the env input to your caller workflow:

jobs:
dispatch:
uses: fetch-rewards/buck-bronson/.github/workflows/bucky-dispatch.yml@v1
with:
preset: web
env: |
DATABASE_URL=postgres://localhost:5432/myapp
REDIS_URL=redis://localhost:6379
PORT=3000
secrets: inherit

For sensitive values, reference repository secrets using the secrets context:

env: |
DATABASE_URL=${{ secrets.DATABASE_URL }}
API_KEY=${{ secrets.EXTERNAL_API_KEY }}
  1. The env input is passed as a multiline string to the reusable workflow
  2. After checkout, a shell step parses each KEY=VALUE line and writes it to $GITHUB_ENV
  3. All subsequent steps (preset resolution, dev setup, Claude execution) see these variables
  4. Variables are available inside composite actions and to MCP servers running in plugins
VariablePurpose
DATABASE_URLDatabase connection for running tests
REDIS_URLRedis connection for integration tests
PORTService port for local testing
API_KEYExternal API authentication
FEATURE_FLAG_*Feature flag overrides for testing