feat: intermediate badge submission - tasks 4-7 completed#2
feat: intermediate badge submission - tasks 4-7 completed#2PruthuviDe merged 14 commits intomainfrom
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (4)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR adds two submission documentation files documenting beginner and intermediate GitHub Actions task completions, introduces a new custom workflow triggered on develop branch pushes, upgrades workflow action versions from v3 to v4, expands Node.js matrix testing to include version 20.x, adds environment variables to build-test workflow, and integrates secret handling in hello-world workflow. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/custom.yml:
- Around line 10-11: The workflow uses outdated action versions; update the uses
references for actions/checkout and actions/setup-node from `@v3` to a current
major like `@v4` (or `@v6` for latest) so the steps use runners with Node.js 20+;
locate the lines with "uses: actions/checkout@v3" and "uses:
actions/setup-node@v3" and change the tags to the chosen newer major (e.g.,
actions/checkout@v4 and actions/setup-node@v6), then run or validate the
workflow to ensure compatibility.
In @.github/workflows/hello-world.yml:
- Around line 36-40: The "Access secret" step currently assigns SECRET="${{
secrets.TEST_SECRET }}" and continues even if the secret is empty; add an
explicit runtime check in that step after assigning SECRET to verify it's
non-empty (e.g., test SECRET with -z) and immediately echo a clear error and
exit 1 when missing so the job fails fast; update the step that defines SECRET
in the "Access secret" step to perform this validation before printing the
length.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1ff08619-7195-46c8-b187-e28f81d4a973
⛔ Files ignored due to path filters (4)
.github/submissions/task1-workflow.pngis excluded by!**/*.png.github/submissions/task2-push-trigger.pngis excluded by!**/*.png.github/submissions/task3-browser.pngis excluded by!**/*.png.github/submissions/task3.1-browser.pngis excluded by!**/*.png
📒 Files selected for processing (5)
.github/submissions/beginner-pruthuvi.md.github/submissions/intermediate-pruthuvi.md.github/workflows/build-test.yml.github/workflows/custom.yml.github/workflows/hello-world.yml
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-node@v3 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n 'uses:\s*actions/(checkout|setup-node)@v3' .github/workflows/custom.yml .github/workflows/build-test.yml .github/workflows/hello-world.ymlRepository: PruthuviDe/github-actions-learning
Length of output: 1834
🌐 Web query:
actions/checkout v3 deprecated v4 upgrade
💡 Result:
actions/checkout@v3 is not formally deprecated and continues to receive security updates, but it runs on Node.js 16, which is end-of-life. GitHub Actions runners now default to Node.js 20+, causing warnings or compatibility issues on older self-hosted runners. Upgrade to @v4 (Node 20) or newer (@v6 latest as of 2026) for modern Node support, better performance, and new features like partial checkout filters. Upgrade steps: 1. Change uses: actions/checkout@v3 to uses: actions/checkout@v4 (or @v6). 2. No breaking changes; most inputs compatible. 3. Add recommended permissions: permissions: contents: read 4. Test workflows; v4 adds support for --no-progress fetch and Node 20. Current latest: v6.0.2 (improved credential security). Repo actively maintained with v4+ getting updates.
Citations:
- 1: Bump actions/checkout from 3 to 4 actions/checkout#1697
- 2: [Github Actions] actions/checkout@v3 should be upgraded to v4 denoland/fresh#2285
- 3: https://github.com/actions/checkout
- 4: https://github.com/actions/checkout/blob/main/CHANGELOG.md
- 5: https://github.com/marketplace/actions/checkout
- 6: https://github.com/actions/checkout/releases
- 7: https://github.com/actions/checkout/blob/v3.1.0/CHANGELOG.md
- 8: https://www.tce-colombia.com
- 9: https://github.blog/changelog/2025-02-12-notice-of-upcoming-deprecations-and-breaking-changes-for-github-actions
- 10: checkout@v3 using node20 instead of node16 actions/checkout#1809
- 11: Node.js 16 actions are deprecated actions/checkout#1596
🌐 Web query:
actions/setup-node v3 deprecated v4
💡 Result:
actions/setup-node v3 is deprecated due to its use of Node.js 16 runtime, which GitHub Actions deprecated in late 2023/early 2024. Users should upgrade to v4 or later. Current latest version is v6.3.0 (released March 2026). Key upgrade path: - v3 -> v4: Updated to Node.js 20 runtime (released ~2023-2024). - v4 -> v5: Added automatic caching with package manager detection; upgraded to Node.js 24 (September 2025). - v5 -> v6: Further caching refinements for npm; removed deprecated always-auth input. Migration example: # Old (v3) - uses: actions/setup-node@v3 with: node-version: '20' # New (v6 recommended) - uses: actions/setup-node@v6 with: node-version: '24' No breaking changes block v3 to v4 upgrade directly, but review v5+ changes for caching behavior. Use v6 for latest features and Node.js 24 compatibility ahead of Node 20 deprecation (summer 2026).
Citations:
- 1: https://github.com/actions/setup-node/blob/main/README.md
- 2: https://github.com/actions/setup-node/releases
- 3: https://github.com/actions/setup-node
- 4: Node 16 deprecation actions/setup-node#850
- 5: https://github.blog/changelog/2024-03-06-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
- 6: https://stackoverflow.com/questions/77992218/github-actions-failing-after-upgrading-to-node-v20
Upgrade outdated GitHub Actions versions.
Lines 10–11 use @v3, which runs on Node.js 16 (end-of-life). Upgrade to @v4 (or @v6 for the latest) to use Node.js 20+ and ensure compatibility with current GitHub Actions runners.
Proposed fix
- - uses: actions/checkout@v3
- - uses: actions/setup-node@v3
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 |
🧰 Tools
🪛 actionlint (1.7.11)
[error] 10-10: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
[error] 11-11: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/custom.yml around lines 10 - 11, The workflow uses
outdated action versions; update the uses references for actions/checkout and
actions/setup-node from `@v3` to a current major like `@v4` (or `@v6` for latest) so
the steps use runners with Node.js 20+; locate the lines with "uses:
actions/checkout@v3" and "uses: actions/setup-node@v3" and change the tags to
the chosen newer major (e.g., actions/checkout@v4 and actions/setup-node@v6),
then run or validate the workflow to ensure compatibility.
| - name: Access secret | ||
| run: | | ||
| SECRET="${{ secrets.TEST_SECRET }}" | ||
| echo "Secret length: ${#SECRET}" | ||
|
|
There was a problem hiding this comment.
Fail fast if TEST_SECRET is missing.
At Line 38, an unset secret becomes an empty string and the job still succeeds. Add an explicit check so this step validates configuration instead of silently passing.
Proposed fix
- name: Access secret
- run: |
- SECRET="${{ secrets.TEST_SECRET }}"
- echo "Secret length: ${`#SECRET`}"
+ env:
+ SECRET: ${{ secrets.TEST_SECRET }}
+ run: |
+ if [ -z "$SECRET" ]; then
+ echo "TEST_SECRET is not configured"
+ exit 1
+ fi
+ echo "TEST_SECRET is configured"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Access secret | |
| run: | | |
| SECRET="${{ secrets.TEST_SECRET }}" | |
| echo "Secret length: ${#SECRET}" | |
| - name: Access secret | |
| env: | |
| SECRET: ${{ secrets.TEST_SECRET }} | |
| run: | | |
| if [ -z "$SECRET" ]; then | |
| echo "TEST_SECRET is not configured" | |
| exit 1 | |
| fi | |
| echo "TEST_SECRET is configured" |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/hello-world.yml around lines 36 - 40, The "Access secret"
step currently assigns SECRET="${{ secrets.TEST_SECRET }}" and continues even if
the secret is empty; add an explicit runtime check in that step after assigning
SECRET to verify it's non-empty (e.g., test SECRET with -z) and immediately echo
a clear error and exit 1 when missing so the job fails fast; update the step
that defines SECRET in the "Access secret" step to perform this validation
before printing the length.
Completing intermediate badge tasks 4-7 with evidence of successful execution.
Tasks Completed:
See
.github/submissions/intermediate-pruthuvi.mdfor full details and evidence documentation.Summary by CodeRabbit
Documentation
Chores