-
-
Notifications
You must be signed in to change notification settings - Fork 993
fix preview checkout #4468
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
fix preview checkout #4468
Conversation
WalkthroughThe GitHub Actions workflow for preview deployments was restructured by splitting the original deploy job into two separate jobs: Changes
Suggested labels
Suggested reviewers
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/deploy-preview.yml (1)
20-21
: Explicitly checkout the PR head SHA
Specifyingwith: ref: ${{ github.event.pull_request.head.sha }}ensures the preview is built from the exact PR commit rather than a merge or default branch. This aligns perfectly with the PR’s goal.
Consider addingfetch-depth: 0
if your build or deployment requires full Git history or tag resolution.
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.github/workflows/deploy-preview.yml (2)
15-17
: Checkout uses PR head SHA and disables credentials
Usingref: ${{ github.event.pull_request.head.sha }}
ensures we build the exact PR commit, andpersist-credentials: false
prevents GITHUB_TOKEN from leaking to untrusted code.Consider adding
fetch-depth: 0
to avoid shallow-clone issues when the head SHA isn’t in the default history. Please verify this checkout works on forked‐PRs.
72-72
: Add newline at end of file
YAMLLint flagged the missing newline at EOF—append a line break to satisfy the linter.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 72-72: no new line character at the end of file
(new-line-at-end-of-file)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
.github/workflows/deploy-preview.yml
(3 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/deploy-preview.yml
[error] 72-72: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (5)
.github/workflows/deploy-preview.yml (5)
4-4
: Restricting trigger events is appropriate
Limitingpull_request_target
to onlyopened
,synchronize
, andreopened
onmaster
reduces unnecessary runs and aligns with the preview checkout intent.
9-10
: Build job separation looks good
Splitting the build phase into its own job without secrets access clearly separates concerns and follows best practices.
34-38
: Artifact upload correctly configured
Uploadingsrc/dist
asdist-files
is consistent with downstream download steps.
40-49
: Deploy job permissions and dependency are well defined
Thedeploy
job correctly depends onbuild
and only grants necessary rights (contents
,deployments
,issues
,pull-requests
).
50-56
: Artifact download entry is correct
The deploy job pullingdist-files
for deployment aligns perfectly with the upload step; no further changes needed.
|
Preview URL: https://70853365.betaflight-configurator.pages.dev |
I've unsubscribe to almost 45 channels and continued to do so. Please take
me off of the email list. I do not want to be bothered with this any
longer. It's not something I'm interested in and I just do not care to help
or read any of the emails above stop..
…On Thu, May 15, 2025, 10:34 AM github-actions[bot] ***@***.***> wrote:
*github-actions[bot]* left a comment
(betaflight/betaflight-configurator#4468)
<#4468 (comment)>
Preview URL: https://70853365.betaflight-configurator.pages.dev
—
Reply to this email directly, view it on GitHub
<#4468 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AS4BK4JVGHY5DAB7RUQZNI326SQWVAVCNFSM6AAAAAB5DZCMPKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQOBUGA2TAMRVGM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
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.
@nerdCopter is this ready ?
ref: ${{ github.event.pull_request.head.sha }}
for the Deployment PreviewSummary by CodeRabbit