-
Notifications
You must be signed in to change notification settings - Fork 0
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
ci(workflow): fix set-env job (checkout + token) #309
Conversation
WalkthroughThe pull request modifies the Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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
🧹 Outside diff range and nitpick comments (3)
.github/workflows/notify-release.yml (3)
Line range hint
38-77
: Consider adding error handling for discussion creationThe discussion creation implementation looks good, but consider adding error handling for cases where the discussion creation might fail (e.g., rate limits, network issues, or missing permissions).
Add a step to verify the discussion was created:
- name: Create an announcement discussion for release uses: abirismyname/[email protected] + id: create-discussion with: title: 🎉 ${{ needs.set-env.outputs.repo_name }} ${{ needs.set-env.outputs.tag }} released! # ... rest of the config ... + - name: Verify discussion creation + if: steps.create-discussion.outputs.discussion-id == '' + run: | + echo "::error::Failed to create discussion" + exit 1
Line range hint
79-99
: Consider making the docs API URL configurableThe workflow URL is currently hardcoded. Consider moving it to a repository variable for better maintainability and reusability.
Example improvement:
with: - url: "https://api.github.com/repos/axone-protocol/docs/actions/workflows/39152549/dispatches" + url: ${{ vars.DOCS_UPDATE_WORKFLOW_URL }} method: "POST"🧰 Tools
🪛 actionlint
23-23: shellcheck reported issue in this script: SC2086:info:6:20: Double quote to prevent globbing and word splitting
(shellcheck)
23-23: shellcheck reported issue in this script: SC2295:info:8:31: Expansions inside ${..} need to be quoted separately, otherwise they match as patterns
(shellcheck)
23-23: shellcheck reported issue in this script: SC2086:info:9:32: Double quote to prevent globbing and word splitting
(shellcheck)
Line range hint
1-99
: Well-structured workflow with proper separation of concernsThe workflow is well-organized with clear job separation and proper use of:
- Job dependencies and outputs
- Environment variables and secrets
- Conditional execution
- GitHub Actions best practices
Consider adding timeouts to the jobs to prevent hanging in case of issues:
set-env: runs-on: ubuntu-22.04 + timeout-minutes: 5 outputs: tag: ${{ steps.set-env.outputs.tag }}
🧰 Tools
🪛 actionlint
23-23: shellcheck reported issue in this script: SC2086:info:6:20: Double quote to prevent globbing and word splitting
(shellcheck)
23-23: shellcheck reported issue in this script: SC2295:info:8:31: Expansions inside ${..} need to be quoted separately, otherwise they match as patterns
(shellcheck)
23-23: shellcheck reported issue in this script: SC2086:info:9:32: Double quote to prevent globbing and word splitting
(shellcheck)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
.github/workflows/notify-release.yml
(2 hunks)
🔇 Additional comments (1)
.github/workflows/notify-release.yml (1)
18-20
: LGTM! Verify OPS_TOKEN permissions
The addition of the checkout step and GH_TOKEN environment variable are correct and necessary changes. The checkout step is required to access repository content, and the GH_TOKEN is needed for GitHub CLI operations.
Let's verify the token permissions:
Also applies to: 35-35
Self explanatory.
(same than axone-protocol/axoned#814)
Summary by CodeRabbit
New Features
GH_TOKEN
for secure authentication during release operations.Improvements