Add Github Action for auto update BBB Recording Player#1850
Add Github Action for auto update BBB Recording Player#1850
Conversation
|
Warning Rate limit exceeded@samuelwei has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 2 minutes and 28 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughA new GitHub Actions workflow named Changes
Sequence DiagramsequenceDiagram
participant Workflow as GitHub Actions Workflow
participant API as GitHub API
participant Repo as Repository
Workflow->>API: Fetch latest BBB Recording Player version
API-->>Workflow: Return latest version
Workflow->>Repo: Check current Dockerfile version
Workflow->>Workflow: Compare versions
alt Version needs update
Workflow->>Repo: Update Dockerfile with new version
Workflow->>Workflow: Create pull request
else Version is current
Workflow->>Workflow: No action needed
end
🪧 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.
Actionable comments posted: 3
🧹 Nitpick comments (2)
.github/workflows/update-bbb-recording-player.yml (2)
3-6: Add manual trigger for on-demand updates.Consider adding a manual trigger to allow immediate updates when needed:
on: schedule: - cron: "0 0 * * *" # Run every day at midnight + workflow_dispatch: + inputs: + force_update: + description: 'Force update even if versions match' + required: false + type: boolean + default: false
1-36: Consider additional security measures.Since this workflow modifies the Dockerfile and creates PRs automatically, consider these security enhancements:
- Add required reviewers for the generated PRs
- Implement checksum verification for downloaded versions
- Consider using environment protection rules for production branches
Add these configurations to the PR creation step:
with: token: ${{ secrets.GITHUB_TOKEN }} add-paths: "docker/app/Dockerfile" + reviewers: "SamuelWei" # Add required reviewers + labels: "dependencies,automated"🧰 Tools
🪛 actionlint (1.7.4)
29-29: the runner of "peter-evans/create-pull-request@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/update-bbb-recording-player.yml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/update-bbb-recording-player.yml
29-29: the runner of "peter-evans/create-pull-request@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
⏰ Context from checks skipped due to timeout of 90000ms (23)
- GitHub Check: Frontend Tests (20)
- GitHub Check: Frontend Tests (19)
- GitHub Check: Frontend Tests (18)
- GitHub Check: Frontend Tests (17)
- GitHub Check: Frontend Tests (16)
- GitHub Check: Frontend Tests (15)
- GitHub Check: Frontend Tests (14)
- GitHub Check: Frontend Tests (13)
- GitHub Check: Frontend Tests (12)
- GitHub Check: Frontend Tests (11)
- GitHub Check: Frontend Tests (10)
- GitHub Check: Frontend Tests (9)
- GitHub Check: Frontend Tests (8)
- GitHub Check: Frontend Tests (7)
- GitHub Check: Frontend Tests (6)
- GitHub Check: Frontend Tests (5)
- GitHub Check: Frontend Tests (4)
- GitHub Check: Frontend Tests (3)
- GitHub Check: System Tests
- GitHub Check: Frontend Tests (2)
- GitHub Check: Frontend Tests (1)
- GitHub Check: Visual Tests
- GitHub Check: Backend
| - name: Compare the versions | ||
| run: echo "NEEDS_UPDATE=$(dpkg --compare-versions ${{ env.LATEST_PLAYER_VERSION }} gt ${{ env.CURRENT_PLAYER_VERSION }} && echo true || echo false)" >> $GITHUB_ENV |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Add version format validation.
The version comparison assumes valid semver format. Add validation to prevent failures:
- name: Extract the current BBB Recording Player version from Docker file
- run: echo "CURRENT_PLAYER_VERSION=$(sed -n 's/ARG PLAYBACK_PLAYER_VERSION=//p' docker/app/Dockerfile)" >> $GITHUB_ENV
+ run: |
+ version=$(sed -n 's/ARG PLAYBACK_PLAYER_VERSION=//p' docker/app/Dockerfile)
+ if ! echo "$version" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$'; then
+ echo "::error::Invalid version format: $version"
+ exit 1
+ fi
+ echo "CURRENT_PLAYER_VERSION=$version" >> $GITHUB_ENVCommittable suggestion skipped: line range outside the PR's diff.
| - name: Create PR with the update | ||
| if: ${{ env.NEEDS_UPDATE == 'true' }} | ||
| uses: peter-evans/create-pull-request@v3 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| add-paths: "docker/app/Dockerfile" | ||
| commit-message: "Update BBB Recording Player to version ${{ env.LATEST_PLAYER_VERSION }}" | ||
| title: "Update BBB Recording Player to version ${{ env.LATEST_PLAYER_VERSION }}" | ||
| body: "This PR updates the BBB Recording Player to version ${{ env.LATEST_PLAYER_VERSION }}" | ||
| branch: "update-bbb-recording-player-${{ env.LATEST_PLAYER_VERSION }}" |
There was a problem hiding this comment.
Update action version and enhance PR details.
The create-pull-request action is outdated and the PR details could be more informative:
- name: Create PR with the update
if: ${{ env.NEEDS_UPDATE == 'true' }}
- uses: peter-evans/create-pull-request@v3
+ uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
add-paths: "docker/app/Dockerfile"
commit-message: "Update BBB Recording Player to version ${{ env.LATEST_PLAYER_VERSION }}"
- title: "Update BBB Recording Player to version ${{ env.LATEST_PLAYER_VERSION }}"
- body: "This PR updates the BBB Recording Player to version ${{ env.LATEST_PLAYER_VERSION }}"
+ title: "chore(deps): Update BBB Recording Player from ${{ env.CURRENT_PLAYER_VERSION }} to ${{ env.LATEST_PLAYER_VERSION }}"
+ body: |
+ # BBB Recording Player Update
+
+ This PR updates the BBB Recording Player from version ${{ env.CURRENT_PLAYER_VERSION }} to ${{ env.LATEST_PLAYER_VERSION }}.
+
+ ## Changelog
+ Please check the [release notes](https://github.com/bigbluebutton/bbb-playback/releases/tag/v${{ env.LATEST_PLAYER_VERSION }}) for details.
+
+ ## Automated Update
+ This PR was automatically generated by the BBB Recording Player update workflow.Committable suggestion skipped: line range outside the PR's diff.
🧰 Tools
🪛 actionlint (1.7.4)
29-29: the runner of "peter-evans/create-pull-request@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
| - name: Get the latest BBB Recording Player version | ||
| run: echo "LATEST_PLAYER_VERSION=$(curl -s https://api.github.com/repos/bigbluebutton/bbb-playback/releases/latest | jq -r '.tag_name' | sed 's/^v//')" >> $GITHUB_ENV |
There was a problem hiding this comment.
Improve GitHub API call reliability.
The current GitHub API call might fail due to rate limiting. Consider these improvements:
- - name: Get the latest BBB Recording Player version
- run: echo "LATEST_PLAYER_VERSION=$(curl -s https://api.github.com/repos/bigbluebutton/bbb-playback/releases/latest | jq -r '.tag_name' | sed 's/^v//')" >> $GITHUB_ENV
+ - name: Get the latest BBB Recording Player version
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ response=$(curl -sL \
+ -H "Authorization: Bearer $GH_TOKEN" \
+ -H "Accept: application/vnd.github.v3+json" \
+ https://api.github.com/repos/bigbluebutton/bbb-playback/releases/latest)
+ if [ "$(echo "$response" | jq -r '.message')" = "Not Found" ]; then
+ echo "::error::Failed to fetch latest version"
+ exit 1
+ fi
+ echo "LATEST_PLAYER_VERSION=$(echo "$response" | jq -r '.tag_name' | sed 's/^v//')" >> $GITHUB_ENV📝 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: Get the latest BBB Recording Player version | |
| run: echo "LATEST_PLAYER_VERSION=$(curl -s https://api.github.com/repos/bigbluebutton/bbb-playback/releases/latest | jq -r '.tag_name' | sed 's/^v//')" >> $GITHUB_ENV | |
| - name: Get the latest BBB Recording Player version | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| response=$(curl -sL \ | |
| -H "Authorization: Bearer $GH_TOKEN" \ | |
| -H "Accept: application/vnd.github.v3+json" \ | |
| https://api.github.com/repos/bigbluebutton/bbb-playback/releases/latest) | |
| if [ "$(echo "$response" | jq -r '.message')" = "Not Found" ]; then | |
| echo "::error::Failed to fetch latest version" | |
| exit 1 | |
| fi | |
| echo "LATEST_PLAYER_VERSION=$(echo "$response" | jq -r '.tag_name' | sed 's/^v//')" >> $GITHUB_ENV |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1850 +/- ##
==============================================
+ Coverage 81.28% 96.42% +15.14%
Complexity 1410 1410
==============================================
Files 364 364
Lines 9576 9576
Branches 879 879
==============================================
+ Hits 7784 9234 +1450
+ Misses 1792 342 -1450 ☔ View full report in Codecov by Sentry. |
PILOS
|
||||||||||||||||||||||||||||
| Project |
PILOS
|
| Branch Review |
develop
|
| Run status |
|
| Run duration | 05m 32s |
| Commit |
|
| Committer | Samuel Weirich |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
555
|
| View all changes introduced in this branch ↗︎ | |
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
.github/workflows/update-bbb-recording-player.yml (2)
16-22:⚠️ Potential issueImprove GitHub API call reliability.
The current GitHub API call might fail due to rate limiting and lacks error handling.
- - name: Get the latest BBB Recording Player release - run: echo "PLAYER_RELEASE=$(curl -s https://api.github.com/repos/bigbluebutton/bbb-playback/releases/latest)" >> $GITHUB_ENV - - - name: Extract the latest BBB Recording Player version - run: echo "LATEST_PLAYER_VERSION=$(echo $PLAYER_RELEASE | jq -r '.tag_name' | sed 's/v//')" >> $GITHUB_ENV - - name: Extract the latest BBB Recording Player release notes - run: echo "LATEST_PLAYER_RELEASE_NOTES=$(echo $PLAYER_RELEASE | jq -r '.body')" >> $GITHUB_ENV + - name: Get the latest BBB Recording Player release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + response=$(curl -sL \ + -H "Authorization: Bearer $GH_TOKEN" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/bigbluebutton/bbb-playback/releases/latest) + if [ "$(echo "$response" | jq -r '.message')" = "Not Found" ]; then + echo "::error::Failed to fetch latest version" + exit 1 + fi + echo "PLAYER_RELEASE=$response" >> $GITHUB_ENV + echo "LATEST_PLAYER_VERSION=$(echo "$response" | jq -r '.tag_name' | sed 's/^v//')" >> $GITHUB_ENV + echo "LATEST_PLAYER_RELEASE_NOTES=$(echo "$response" | jq -r '.body')" >> $GITHUB_ENV
28-31:⚠️ Potential issueAdd version format validation.
The version comparison assumes valid semver format. Add validation to prevent failures.
- name: Extract the current BBB Recording Player version from Docker file - run: echo "CURRENT_PLAYER_VERSION=$(sed -n 's/ARG PLAYBACK_PLAYER_VERSION=//p' docker/app/Dockerfile)" >> $GITHUB_ENV + run: | + version=$(sed -n 's/ARG PLAYBACK_PLAYER_VERSION=//p' docker/app/Dockerfile) + if ! echo "$version" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$'; then + echo "::error::Invalid version format: $version" + exit 1 + fi + echo "CURRENT_PLAYER_VERSION=$version" >> $GITHUB_ENV
🧹 Nitpick comments (1)
.github/workflows/update-bbb-recording-player.yml (1)
4-6: Remove the push trigger after testing.The push trigger on the feature branch appears to be for testing purposes. Once the workflow is verified, remove these lines to keep only the scheduled trigger.
on: - push: - branches: - - add-ci-action-for-bbb-player-update schedule: - cron: "0 0 * * *" # Run every day at midnight
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/update-bbb-recording-player.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (23)
- GitHub Check: Frontend Tests (20)
- GitHub Check: Frontend Tests (19)
- GitHub Check: Frontend Tests (18)
- GitHub Check: Frontend Tests (17)
- GitHub Check: Frontend Tests (16)
- GitHub Check: Frontend Tests (15)
- GitHub Check: Frontend Tests (14)
- GitHub Check: Frontend Tests (13)
- GitHub Check: Frontend Tests (12)
- GitHub Check: Frontend Tests (11)
- GitHub Check: Frontend Tests (10)
- GitHub Check: Frontend Tests (9)
- GitHub Check: Frontend Tests (8)
- GitHub Check: Frontend Tests (7)
- GitHub Check: Frontend Tests (6)
- GitHub Check: Frontend Tests (5)
- GitHub Check: Frontend Tests (4)
- GitHub Check: Frontend Tests (3)
- GitHub Check: System Tests
- GitHub Check: Frontend Tests (2)
- GitHub Check: Frontend Tests (1)
- GitHub Check: Visual Tests
- GitHub Check: Backend
| title: "Bump BBB Recording Player from ${{ env.LATEST_PLAYER_VERSION }} to ${{ env.CURRENT_PLAYER_VERSION }}" | ||
| labels: "dependencies" | ||
| body: | | ||
| Bumps BBB Recording Player from ${{ env.LATEST_PLAYER_VERSION }} to ${{ env.CURRENT_PLAYER_VERSION }} |
There was a problem hiding this comment.
Fix version order in PR title and body.
The current and latest versions are swapped in the PR title and body, which could be misleading.
- title: "Bump BBB Recording Player from ${{ env.LATEST_PLAYER_VERSION }} to ${{ env.CURRENT_PLAYER_VERSION }}"
+ title: "Bump BBB Recording Player from ${{ env.CURRENT_PLAYER_VERSION }} to ${{ env.LATEST_PLAYER_VERSION }}"
labels: "dependencies"
body: |
- Bumps BBB Recording Player from ${{ env.LATEST_PLAYER_VERSION }} to ${{ env.CURRENT_PLAYER_VERSION }}
+ Bumps BBB Recording Player from ${{ env.CURRENT_PLAYER_VERSION }} to ${{ env.LATEST_PLAYER_VERSION }}📝 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.
| title: "Bump BBB Recording Player from ${{ env.LATEST_PLAYER_VERSION }} to ${{ env.CURRENT_PLAYER_VERSION }}" | |
| labels: "dependencies" | |
| body: | | |
| Bumps BBB Recording Player from ${{ env.LATEST_PLAYER_VERSION }} to ${{ env.CURRENT_PLAYER_VERSION }} | |
| title: "Bump BBB Recording Player from ${{ env.CURRENT_PLAYER_VERSION }} to ${{ env.LATEST_PLAYER_VERSION }}" | |
| labels: "dependencies" | |
| body: | | |
| Bumps BBB Recording Player from ${{ env.CURRENT_PLAYER_VERSION }} to ${{ env.LATEST_PLAYER_VERSION }} |
1ec1f1a to
6cee093
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/workflows/update-bbb-recording-player.yml (1)
43-65: Enhance PR creation configuration.Consider these improvements to the PR creation:
- Add timestamp to branch name to prevent conflicts
- Specify reviewers and assignees
- Add more descriptive labels
with: token: ${{ secrets.GITHUB_TOKEN }} add-paths: "docker/app/Dockerfile" commit-message: "Update BBB Recording Player to version ${{ env.LATEST_PLAYER_VERSION }}" title: "Bump BBB Recording Player from ${{ env.CURRENT_PLAYER_VERSION }} to ${{ env.LATEST_PLAYER_VERSION }}" - labels: "dependencies" + labels: | + dependencies + automated-pr + bbb-recording-player + assignees: ${{ github.repository_owner }} + reviewers: ${{ github.repository_owner }} body: | - branch: "update-bbb-recording-player-${{ env.LATEST_PLAYER_VERSION }}" + branch: "update-bbb-recording-player-${{ env.LATEST_PLAYER_VERSION }}-${{ github.run_id }}"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/update-bbb-recording-player.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (23)
- GitHub Check: Frontend Tests (20)
- GitHub Check: Frontend Tests (19)
- GitHub Check: Frontend Tests (18)
- GitHub Check: Frontend Tests (17)
- GitHub Check: Frontend Tests (16)
- GitHub Check: Frontend Tests (15)
- GitHub Check: Frontend Tests (14)
- GitHub Check: Frontend Tests (13)
- GitHub Check: Frontend Tests (12)
- GitHub Check: Frontend Tests (11)
- GitHub Check: Frontend Tests (10)
- GitHub Check: Frontend Tests (9)
- GitHub Check: Frontend Tests (8)
- GitHub Check: Frontend Tests (7)
- GitHub Check: Frontend Tests (6)
- GitHub Check: Frontend Tests (5)
- GitHub Check: Frontend Tests (4)
- GitHub Check: Frontend Tests (3)
- GitHub Check: Frontend Tests (2)
- GitHub Check: System Tests
- GitHub Check: Frontend Tests (1)
- GitHub Check: Visual Tests
- GitHub Check: Backend
🔇 Additional comments (4)
.github/workflows/update-bbb-recording-player.yml (4)
4-6: Remove the branch-specific trigger after testing.The push trigger on
add-ci-action-for-bbb-player-updateappears to be for development purposes. Once testing is complete, this should be removed to leave only the scheduled trigger.
19-21: Improve GitHub API call reliability.The GitHub API call needs authentication and error handling to avoid rate limiting issues.
37-38: Add version format validation.Version comparison assumes valid semver format. Add validation to prevent failures.
19-21:⚠️ Potential issueHandle version prefix consistently.
The version extraction doesn't handle the 'v' prefix from the tag name, which could cause comparison issues later. Add prefix handling:
- run: echo "LATEST_PLAYER_VERSION=$(jq -r '.tag_name' player-release.json)" >> $GITHUB_ENV + run: echo "LATEST_PLAYER_VERSION=$(jq -r '.tag_name' player-release.json | sed 's/^v//')" >> $GITHUB_ENVLikely invalid or redundant comment.
| run: | | ||
| sed -i "s/ARG PLAYBACK_PLAYER_VERSION=.*/ARG PLAYBACK_PLAYER_VERSION=${LATEST_PLAYER_VERSION}/" docker/app/Dockerfile |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Add error handling for Dockerfile update.
The sed command could fail if the ARG line doesn't exist. Add validation:
run: |
+ if ! grep -q "ARG PLAYBACK_PLAYER_VERSION=" docker/app/Dockerfile; then
+ echo "::error::PLAYBACK_PLAYER_VERSION ARG not found in Dockerfile"
+ exit 1
+ fi
sed -i "s/ARG PLAYBACK_PLAYER_VERSION=.*/ARG PLAYBACK_PLAYER_VERSION=${LATEST_PLAYER_VERSION}/" docker/app/Dockerfile📝 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.
| run: | | |
| sed -i "s/ARG PLAYBACK_PLAYER_VERSION=.*/ARG PLAYBACK_PLAYER_VERSION=${LATEST_PLAYER_VERSION}/" docker/app/Dockerfile | |
| run: | | |
| if ! grep -q "ARG PLAYBACK_PLAYER_VERSION=" docker/app/Dockerfile; then | |
| echo "::error::PLAYBACK_PLAYER_VERSION ARG not found in Dockerfile" | |
| exit 1 | |
| fi | |
| sed -i "s/ARG PLAYBACK_PLAYER_VERSION=.*/ARG PLAYBACK_PLAYER_VERSION=${LATEST_PLAYER_VERSION}/" docker/app/Dockerfile |
| run: | | ||
| RELEASE_NOTES_MARKDOWN=$(jq -r '.body' player-release.json) | ||
| RELEASE_NOTES_HTML=$(echo "$RELEASE_NOTES_MARKDOWN" | gh markdown-render) | ||
|
|
||
| # Store in GitHub Actions environment variable | ||
| echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV | ||
| echo "$RELEASE_NOTES_HTML" >> $GITHUB_ENV | ||
| echo "EOF" >> $GITHUB_ENV |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Add error handling for release notes extraction.
The release notes extraction lacks error handling. Consider adding checks:
run: |
+ if ! jq -e '.body' player-release.json > /dev/null; then
+ echo "::warning::Failed to extract release notes"
+ RELEASE_NOTES_MARKDOWN="No release notes available"
+ else
RELEASE_NOTES_MARKDOWN=$(jq -r '.body' player-release.json)
+ fi
RELEASE_NOTES_HTML=$(echo "$RELEASE_NOTES_MARKDOWN" | gh markdown-render)
+ if [ $? -ne 0 ]; then
+ echo "::warning::Failed to render markdown"
+ RELEASE_NOTES_HTML="$RELEASE_NOTES_MARKDOWN"
+ fi
# Store in GitHub Actions environment variable📝 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.
| run: | | |
| RELEASE_NOTES_MARKDOWN=$(jq -r '.body' player-release.json) | |
| RELEASE_NOTES_HTML=$(echo "$RELEASE_NOTES_MARKDOWN" | gh markdown-render) | |
| # Store in GitHub Actions environment variable | |
| echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV | |
| echo "$RELEASE_NOTES_HTML" >> $GITHUB_ENV | |
| echo "EOF" >> $GITHUB_ENV | |
| run: | | |
| if ! jq -e '.body' player-release.json > /dev/null; then | |
| echo "::warning::Failed to extract release notes" | |
| RELEASE_NOTES_MARKDOWN="No release notes available" | |
| else | |
| RELEASE_NOTES_MARKDOWN=$(jq -r '.body' player-release.json) | |
| fi | |
| RELEASE_NOTES_HTML=$(echo "$RELEASE_NOTES_MARKDOWN" | gh markdown-render) | |
| if [ $? -ne 0 ]; then | |
| echo "::warning::Failed to render markdown" | |
| RELEASE_NOTES_HTML="$RELEASE_NOTES_MARKDOWN" | |
| fi | |
| # Store in GitHub Actions environment variable | |
| echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV | |
| echo "$RELEASE_NOTES_HTML" >> $GITHUB_ENV | |
| echo "EOF" >> $GITHUB_ENV |
22840a6 to
5004626
Compare
5004626 to
cc22991
Compare
Type
Checklist
Changes
Summary by CodeRabbit