-
Notifications
You must be signed in to change notification settings - Fork 230
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
[cicd] publish nightly #2550
base: main
Are you sure you want to change the base?
[cicd] publish nightly #2550
Conversation
📝 WalkthroughWalkthroughThe changes introduce a new job step named "Publish to Cloudflare DNS" in the GitHub Actions workflow file Changes
Sequence Diagram(s)sequenceDiagram
participant Workflow as GitHub Workflow
participant API as Cloudflare API
Workflow->>Workflow: Upload devbox artifact
Workflow->>API: PATCH request to update ruleset with redirect
API-->>Workflow: Response confirming ruleset update
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (25)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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
CodeRabbit Configuration File (
|
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/cli-tests.yaml (2)
70-72
: Step Initialization - Conditional Execution:
The new job step "Publish to Cloudflare DNS" is clearly introduced. However, the conditional line (if: github.event_name == 'schedule'
) is currently commented out. Please confirm whether you intend this step to run only on scheduled (nightly) builds, and if so, consider uncommenting or parameterizing this condition to avoid accidental execution during non-scheduled events.
76-87
: DNS Record API Invocation:
The curl command initiates a POST request to Cloudflare to create a CNAME record with the constructed artifact URL. Consider the following enhancements:
- Error Handling: Adding the
-f
flag (or similar error checks) to the curl command can help fail fast if the HTTP request doesn’t succeed.- Payload Clarity: The current construction of the JSON payload (using single quotes with embedded variable expansion) works, but using a HEREDOC or another clearer syntax might improve readability and reduce potential quoting pitfalls.
- URL Validation: Verify that the constructed
ARTIFACT_URL
is formatted as intended and points to a valid target for a CNAME record.
Example diff for adding an error flag:- curl -X POST "https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_ZONE_ID/dns_records" \ + curl -f -X POST "https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_ZONE_ID/dns_records" \
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/cli-tests.yaml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (23)
- GitHub Check: test-nix-versions (macos-13, 2.24.7)
- GitHub Check: test-nix-versions (macos-13, 2.19.2)
- GitHub Check: test (not-main, ubuntu-latest, project-tests-off, 2.20.1)
- GitHub Check: test-nix-versions (macos-13, 2.18.0)
- GitHub Check: test (not-main, ubuntu-latest, project-tests-off, 2.19.2)
- GitHub Check: test-nix-versions (macos-13, 2.17.0)
- GitHub Check: test-nix-versions (macos-13, 2.16.1)
- GitHub Check: test (not-main, ubuntu-latest, project-tests-off, 2.12.0)
- GitHub Check: test-nix-versions (macos-13, 2.15.1)
- GitHub Check: test (not-main, ubuntu-latest, project-tests-only, 2.20.1)
- GitHub Check: test-nix-versions (ubuntu-latest, 2.24.7)
- GitHub Check: test (not-main, ubuntu-latest, project-tests-only, 2.19.2)
- GitHub Check: auto-nix-install (macos-13, false)
- GitHub Check: test-nix-versions (ubuntu-latest, 2.19.2)
- GitHub Check: test (not-main, ubuntu-latest, project-tests-only, 2.12.0)
- GitHub Check: auto-nix-install (macos-13, true)
- GitHub Check: test-nix-versions (ubuntu-latest, 2.18.0)
- GitHub Check: auto-nix-install (ubuntu-latest, false)
- GitHub Check: test-nix-versions (ubuntu-latest, 2.17.0)
- GitHub Check: auto-nix-install (ubuntu-latest, true)
- GitHub Check: test-nix-versions (ubuntu-latest, 2.16.1)
- GitHub Check: test-nix-versions (ubuntu-latest, 2.15.1)
- GitHub Check: golangci-lint (macos-13)
🔇 Additional comments (1)
.github/workflows/cli-tests.yaml (1)
73-75
: Environment Variable Configuration:
The Cloudflare API token and zone ID are properly sourced from GitHub secrets. Please ensure that the secretsCLOUDFLARE_API_TOKEN
andCLOUDFLARE_ZONE_ID
are configured in your repository settings and are kept secure.
Summary
Upload nightly ubuntu build so we can use it devbox install action.
Available at nightly-ubuntu.dev-jetify.com
How was it tested?
Community Contribution License
All community contributions in this pull request are licensed to the project
maintainers under the terms of the
Apache 2 License.
By creating this pull request, I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 License as stated in
the
Community Contribution License.
Summary by CodeRabbit