-
-
Notifications
You must be signed in to change notification settings - Fork 0
Skip Neon preview branch jobs when PR secrets are unavailable #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -229,6 +229,18 @@ Use Vercel's API to set environment variables for preview deployment: | |||||
| 2. Check API key has sufficient permissions | ||||||
| 3. Regenerate API key if needed | ||||||
|
|
||||||
| ### Workflow Skips Neon Jobs on Dependabot or Unconfigured PRs | ||||||
|
|
||||||
| **Behavior**: `create_neon_branch` and `delete_neon_branch` are skipped instead of failing. | ||||||
|
|
||||||
| **Why it happens**: | ||||||
| 1. GitHub does not expose repository secrets to Dependabot-triggered `pull_request` workflows | ||||||
| 2. The repository is missing `NEON_API_KEY` or `NEON_PROJECT_ID` | ||||||
|
|
||||||
| **What to do**: | ||||||
| 1. No action is required for Dependabot PRs; skipping is expected | ||||||
| 2. For regular PRs, add `NEON_API_KEY` and `NEON_PROJECT_ID` in repository Actions settings if Neon preview branches should run | ||||||
|
||||||
| 2. For regular PRs, add `NEON_API_KEY` and `NEON_PROJECT_ID` in repository Actions settings if Neon preview branches should run | |
| 2. For regular PRs, add `NEON_API_KEY` as a repository Actions **Secret** and `NEON_PROJECT_ID` as a repository Actions **Variable** if Neon preview branches should run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Dependabot-specific skip message is currently unreachable when secrets are not exposed: for Dependabot PRs,
NEON_API_KEYwill be empty, so the firstifbranch fires and logs "credentials are unavailable" instead of the Dependabot explanation. Consider checkingWORKFLOW_ACTOR == dependabot[bot]first (or using separateifblocks) so the logs accurately describe why the jobs are skipped.