-
Notifications
You must be signed in to change notification settings - Fork 5
test: add benign file to check workflow #14
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughRemoves the GitHub Actions workflow .github/workflows/list-img.yml that previously handled image conversion (HEIC→JPG, JPG→WebP), cleanup, listing via list-img.js, and auto-commit on pushes or manual dispatch. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant GH as GitHub Actions
participant Job as convert (workflow job)
participant Sys as System Tools
Dev->>GH: Push to img/** or workflow_dispatch
Note over GH: (Workflow now removed)
GH--xJob: No job triggered
rect rgb(245,245,250)
Note over Dev,Sys: Previous (removed) flow
Dev->>GH: Trigger workflow
GH->>Job: Start job on ubuntu-latest
Job->>Job: actions/checkout@v2
Job->>Job: actions/setup-node@v2 (Node 20.10.0)
Job->>Sys: apt-get install webp, libheif-examples, imagemagick, ffmpeg
Job->>Sys: List HEIC files
alt HEIC found
Job->>Sys: heif-convert *.heic -> *.jpg
Job->>Sys: Delete source HEIC on success
end
Job->>Sys: Cleanup auxiliary files
Job->>Sys: Convert JPG -> WebP (ffmpeg/convert)
Job->>Sys: Move outputs to converted/club/...
Job->>Job: node ./list-img.js
Job->>Job: Configure git user/email
alt Changes detected
Job->>GH: Commit and push
else No changes
Job->>GH: Skip commit
end
end
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
💤 Files with no reviewable 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. Comment |
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: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
img/8.pngis excluded by!**/*.png
📒 Files selected for processing (2)
.github/workflows/list-img.yml(1 hunks)test-write.js(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/list-img.yml
13-13: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
16-16: the runner of "actions/setup-node@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (2)
.github/workflows/list-img.yml (2)
3-7: LGTM: Formatting improvements.The reformatting to consistent two-space indentation and the consolidation of apt-get installs improve readability and maintainability without changing functionality.
Also applies to: 9-18, 20-23, 25-55
62-73: Verify git operations handle test artifacts appropriately.The git commit step will include any files created by previous steps, including the test file from line 60. Ensure this is intentional or add cleanup before this step.
.github/workflows/list-img.yml
Outdated
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: 檢出原始碼 | ||
| uses: actions/checkout@v2 |
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.
Update outdated GitHub Actions to supported versions.
Both actions/checkout@v2 and actions/setup-node@v2 use runners that are no longer supported on GitHub Actions. This is a security and compatibility risk.
As per static analysis.
Apply this diff to update to current versions:
- name: 檢出原始碼
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- name: 設定 Node.js
- uses: actions/setup-node@v2
+ uses: actions/setup-node@v4
with:
node-version: "20.10.0"Also applies to: 16-16
🧰 Tools
🪛 actionlint (1.7.7)
13-13: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 Prompt for AI Agents
In .github/workflows/list-img.yml around lines 13 and 16, the workflow uses
outdated actions versions (actions/checkout@v2 and actions/setup-node@v2);
update them to their current supported releases (e.g. actions/checkout@v4 and
actions/setup-node@v4), adjust any deprecated input keys if necessary, run the
workflow locally or in a branch to verify compatibility, and commit the version
bumps.
Summary by CodeRabbit