-
Notifications
You must be signed in to change notification settings - Fork 0
Add example showing how to pass env vars and secrets to the workflow step #40
Copy link
Copy link
Open
Description
Problem
GitHub Actions has two distinct variable types with different syntax:
- Secrets (sensitive):
${{ secrets.MY_SECRET }} - Repository variables (non-sensitive):
${{ vars.MY_VAR }}
The README doesn't show a concrete example of passing either to the git-glimpse step via env:. Users who store their preview URL as a repository variable (a natural choice since it's not sensitive) will use secrets.* by habit and get an empty string silently — which then causes a confusing downstream error.
Suggested fix
Add a snippet to the README showing both cases:
- uses: DeDuckProject/git-glimpse/packages/action@main
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Repository variable (Settings → Variables → Actions):
PREVIEW_URL: ${{ vars.PREVIEW_URL }}
# Secret (Settings → Secrets → Actions):
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}A short note explaining the difference (vars.* vs secrets.*) would save users from a silent failure that's hard to trace.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels