CICD-108 · Pass one secret to a reuse provider
Encyclopedia · Workflow reuse and caching · All snippets
Previous · CICD-107 · Next · CICD-109
1. Where it fits
- Placement .github/workflows/ci.yml, under a job's steps.
- Prerequisites trusted checkout and cache/artifact support verified on the chosen Actions runner.
- Platforms github-actions, gitea-actions.
2. Copy the snippet
yaml
uses: example/platform/.github/workflows/publish.yml@v1
secrets:
publish_token: ${{ secrets.RELEASE_TOKEN }}3. How it works
secrets maps a caller-side value to the provider-side secret name. The reusable workflow must declare that secret in its input contract.
4. Verify the result
Supply the provider contract and minimize forwarded access.
Watch for. Use the intended trusted execution context. Keep secret values out of traces, artifacts and debug output.
Validation syntax-validated (YAML parse). Status definitions.