-
-
Notifications
You must be signed in to change notification settings - Fork 8
Keep consistent board & vendor thumbnail generation #90
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
Conversation
- two images had whit background not transparent - several images were not optimally compressed
|
Warning Rate limit exceeded@igorpecovnik has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 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 ignored due to path filters (25)
📒 Files selected for processing (2)
WalkthroughAdds a new GitHub Actions workflow at Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Files/areas needing extra attention:
Possibly related PRs
Suggested labels
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (124)
board-images/avaota-a1.pngis excluded by!**/*.pngboard-images/ayn-odin2.pngis excluded by!**/*.pngboard-images/bananapi.pngis excluded by!**/*.pngboard-images/bananapif3.pngis excluded by!**/*.pngboard-images/bananapim2.pngis excluded by!**/*.pngboard-images/bananapim2plus.pngis excluded by!**/*.pngboard-images/bananapim2pro.pngis excluded by!**/*.pngboard-images/bananapim2s.pngis excluded by!**/*.pngboard-images/bananapim2zero.pngis excluded by!**/*.pngboard-images/bananapim3.pngis excluded by!**/*.pngboard-images/bananapim4zero.pngis excluded by!**/*.pngboard-images/bananapim64.pngis excluded by!**/*.pngboard-images/bananapim7.pngis excluded by!**/*.pngboard-images/bananapipro.pngis excluded by!**/*.pngboard-images/bananapir2.pngis excluded by!**/*.pngboard-images/beaglev.pngis excluded by!**/*.pngboard-images/beelinkx2.pngis excluded by!**/*.pngboard-images/clearfogbase.pngis excluded by!**/*.pngboard-images/clearfogpro.pngis excluded by!**/*.pngboard-images/cubieboard2.pngis excluded by!**/*.pngboard-images/cubietruck.pngis excluded by!**/*.pngboard-images/cubietruckplus.pngis excluded by!**/*.pngboard-images/cubox-i.pngis excluded by!**/*.pngboard-images/espressobin.pngis excluded by!**/*.pngboard-images/firefly-rk3399.pngis excluded by!**/*.pngboard-images/helios4.pngis excluded by!**/*.pngboard-images/helios64.pngis excluded by!**/*.pngboard-images/hikey960.pngis excluded by!**/*.pngboard-images/inovato-quadra.pngis excluded by!**/*.pngboard-images/jetson-nano.pngis excluded by!**/*.pngboard-images/khadas-edge2.pngis excluded by!**/*.pngboard-images/khadas-vim1.pngis excluded by!**/*.pngboard-images/khadas-vim2.pngis excluded by!**/*.pngboard-images/khadas-vim3.pngis excluded by!**/*.pngboard-images/khadas-vim3l.pngis excluded by!**/*.pngboard-images/khadas-vim4.pngis excluded by!**/*.pngboard-images/lafrite.pngis excluded by!**/*.pngboard-images/lepotato.pngis excluded by!**/*.pngboard-images/licheepi-4a.pngis excluded by!**/*.pngboard-images/lime-a10.pngis excluded by!**/*.pngboard-images/lime-a33.pngis excluded by!**/*.pngboard-images/lime-a64.pngis excluded by!**/*.pngboard-images/lime2.pngis excluded by!**/*.pngboard-images/mixtile-blade3.pngis excluded by!**/*.pngboard-images/mkspi.pngis excluded by!**/*.pngboard-images/nanopct4.pngis excluded by!**/*.pngboard-images/nanopi-m6.pngis excluded by!**/*.pngboard-images/nanopi-r1.pngis excluded by!**/*.pngboard-images/nanopi-r2s.pngis excluded by!**/*.pngboard-images/nanopia64.pngis excluded by!**/*.pngboard-images/nanopiduo.pngis excluded by!**/*.pngboard-images/nanopik1plus.pngis excluded by!**/*.pngboard-images/nanopim1.pngis excluded by!**/*.pngboard-images/nanopim1plus.pngis excluded by!**/*.pngboard-images/nanopim4.pngis excluded by!**/*.pngboard-images/nanopim4v2.pngis excluded by!**/*.pngboard-images/nanopineo.pngis excluded by!**/*.pngboard-images/nanopineo2.pngis excluded by!**/*.pngboard-images/nanopineo2black.pngis excluded by!**/*.pngboard-images/nanopineo3.pngis excluded by!**/*.pngboard-images/nanopineo4.pngis excluded by!**/*.pngboard-images/odroidc1.pngis excluded by!**/*.pngboard-images/odroidc2.pngis excluded by!**/*.pngboard-images/odroidc4.pngis excluded by!**/*.pngboard-images/odroidhc4.pngis excluded by!**/*.pngboard-images/odroidm1.pngis excluded by!**/*.pngboard-images/odroidn2.pngis excluded by!**/*.pngboard-images/odroidxu4.pngis excluded by!**/*.pngboard-images/oneplus-kebab.pngis excluded by!**/*.pngboard-images/orangepi-r1plus.pngis excluded by!**/*.pngboard-images/orangepi-rk3399.pngis excluded by!**/*.pngboard-images/orangepi.pngis excluded by!**/*.pngboard-images/orangepi2.pngis excluded by!**/*.pngboard-images/orangepi3-lts.pngis excluded by!**/*.pngboard-images/orangepi3.pngis excluded by!**/*.pngboard-images/orangepi3b.pngis excluded by!**/*.pngboard-images/orangepi4.pngis excluded by!**/*.pngboard-images/orangepi5-max.pngis excluded by!**/*.pngboard-images/orangepi5.pngis excluded by!**/*.pngboard-images/orangepi5pro.pngis excluded by!**/*.pngboard-images/orangepilite.pngis excluded by!**/*.pngboard-images/orangepilite2.pngis excluded by!**/*.pngboard-images/orangepimini.pngis excluded by!**/*.pngboard-images/orangepione.pngis excluded by!**/*.pngboard-images/orangepioneplus.pngis excluded by!**/*.pngboard-images/orangepipc.pngis excluded by!**/*.pngboard-images/orangepipc2.pngis excluded by!**/*.pngboard-images/orangepipcplus.pngis excluded by!**/*.pngboard-images/orangepiplus.pngis excluded by!**/*.pngboard-images/orangepiplus2e.pngis excluded by!**/*.pngboard-images/orangepiprime.pngis excluded by!**/*.pngboard-images/orangepiwin.pngis excluded by!**/*.pngboard-images/orangepizero.pngis excluded by!**/*.pngboard-images/orangepizero2.pngis excluded by!**/*.pngboard-images/orangepizero2w.pngis excluded by!**/*.pngboard-images/orangepizero3.pngis excluded by!**/*.pngboard-images/orangepizeroplus.pngis excluded by!**/*.pngboard-images/orangepizeroplus2-h3.pngis excluded by!**/*.pngboard-images/orangepizeroplus2-h5.pngis excluded by!**/*.pngboard-images/pcduino2.pngis excluded by!**/*.pngboard-images/pcduino3.pngis excluded by!**/*.pngboard-images/pcduino3nano.pngis excluded by!**/*.pngboard-images/pine64.pngis excluded by!**/*.pngboard-images/pinebook-a64.pngis excluded by!**/*.pngboard-images/pinecube.pngis excluded by!**/*.pngboard-images/quartz64a.pngis excluded by!**/*.pngboard-images/radxa-e25.pngis excluded by!**/*.pngboard-images/radxa-zero2.pngis excluded by!**/*.pngboard-images/renegade.pngis excluded by!**/*.pngboard-images/rock64.pngis excluded by!**/*.pngboard-images/rockpi-s.pngis excluded by!**/*.pngboard-images/rockpro64.pngis excluded by!**/*.pngboard-images/rpi4b.pngis excluded by!**/*.pngboard-images/sk-am64b.pngis excluded by!**/*.pngboard-images/star64.pngis excluded by!**/*.pngboard-images/station-m1.pngis excluded by!**/*.pngboard-images/station-p1.pngis excluded by!**/*.pngboard-images/station-p2.pngis excluded by!**/*.pngboard-images/sweet-potato.pngis excluded by!**/*.pngboard-images/udoo.pngis excluded by!**/*.pngboard-images/visionfive.pngis excluded by!**/*.pngboard-images/visionfive2.pngis excluded by!**/*.pngboard-images/youyeetoo-r1-v3.pngis excluded by!**/*.pngboard-images/z28pro.pngis excluded by!**/*.png
📒 Files selected for processing (1)
.github/workflows/generate-thumbnails.yml(1 hunks)
🔇 Additional comments (4)
.github/workflows/generate-thumbnails.yml (4)
119-119: Clarify intent of--update=noneflag in copy command.Line 119 uses
cp --update=none, which will not overwrite existing files. If the original image already exists in the output directory from a prior run, this command will silently skip it. Confirm whether this is intentional or if you meant to use--update=all(which would overwrite only if source is newer) or remove the flag entirely to always update.
143-182: Approve publish step logic.The artifact download and git push workflow is clean and handles edge cases reasonably (e.g., no changes to commit, merge-multiple artifacts). The setup correctly fetches the data branch and configures git credentials.
44-63: Approve boards discovery logic.The board matrix generation correctly discovers config files, strips extensions, sorts boards, and outputs valid JSON for the matrix strategy. The find command and jq pipeline are well-constructed.
81-85: ImageMagick on Ubuntu 24.04 supports required features; consider pinning version for reproducibility.Ubuntu 24.04's default ImageMagick (6.9.12.98) includes full support for PNG compression level configuration (
-define png:compression-level=N) and alpha channel operations (-alpha set,-transparent, etc.). However, using@latestwithout version pinning may result in unpredictable updates. For production workflows requiring consistent behavior, consider pinning the action to a specific version or ImageMagick release.
fc5eb1a to
62660a4
Compare
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: 1
♻️ Duplicate comments (1)
.github/workflows/generate-thumbnails.yml (1)
147-147: ImageMagick convert command missing transparency and compression settings required by PR objectives.The convert command lacks critical flags to address the stated PR objectives:
- White background issue: Without
-background nonebefore-extent, the operation fills the canvas with opaque white, causing the "white background instead of transparent" problem mentioned in the PR description.- Compression optimization: No PNG compression level is specified, resulting in suboptimal file sizes (contradicts PR objective for "optimally compressed" images).
Additionally,
-alpha setensures the alpha channel is active for full transparency preservation.Apply this diff to fix transparency preservation and enable PNG compression:
- convert "${ORIGINAL}" -resize "${size}^" -gravity center -extent "${size}" "${OUT}" + convert "${ORIGINAL}" \ + -alpha set \ + -background none \ + -resize "${size}^" \ + -gravity center \ + -extent "${size}" \ + -define png:compression-level=9 \ + "${OUT}"The flag order matters:
-alpha setand-background nonemust precede-extentto take effect.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
.github/workflows/generate-thumbnails.yml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.9)
.github/workflows/generate-thumbnails.yml
180-180: input "if-no-artifact-found" is not defined in action "actions/download-artifact@v6". available inputs are "artifact-ids", "github-token", "merge-multiple", "name", "path", "pattern", "repository", "run-id"
(action)
41e1b43 to
42a525e
Compare
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: 2
♻️ Duplicate comments (1)
.github/workflows/generate-thumbnails.yml (1)
159-164: Preserve transparency + apply PNG compression in thumbnail generation (still missing).
Theconvert ... -extentcall will fill extended canvas with the current background (commonly white) unless you explicitly set a transparent background; also no PNG compression settings are applied.- convert "${ORIGINAL}" -resize "${size}^" -gravity center -extent "${size}" "${OUT}" + convert "${ORIGINAL}" \ + -alpha set \ + -background none \ + -resize "${size}^" \ + -gravity center \ + -extent "${size}" \ + -define png:compression-level=9 \ + "${OUT}"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
.github/workflows/generate-thumbnails.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Generate board images (2)
🔇 Additional comments (1)
.github/workflows/generate-thumbnails.yml (1)
190-196: Good: removed invaliddownload-artifact@v6input.
This step now only uses supported inputs.
79ae768 to
03d02c2
Compare
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: 1
♻️ Duplicate comments (2)
.github/workflows/generate-thumbnails.yml (2)
219-220: Use robust git branch checkout that handles missing local branches.The current
git checkout datacommand will fail if the localdatabranch doesn't exist. Usegit checkout -Bto ensure the local branch is created or reset to trackorigin/datareliably.Apply this diff:
git fetch origin data - git checkout data + git checkout -B data origin/data
163-163: Add transparency preservation and PNG compression to ImageMagick command to address PR objectives.The PR objectives explicitly state: "Two images had white background instead of being transparent" and "Several images were not optimally compressed." However, the
convertcommand lacks the necessary flags to address both issues.Without
-background nonebefore-extent, the default white background is used, converting any transparent pixels to white. Additionally, no PNG compression level is specified, leaving files larger than necessary.Apply this diff to fix the transparency and compression issues:
- convert "${ORIGINAL}" -resize "${size}^" -gravity center -extent "${size}" "${OUT}" + convert "${ORIGINAL}" \ + -alpha set \ + -background none \ + -resize "${size}^" \ + -gravity center \ + -extent "${size}" \ + -define png:compression-level=9 \ + "${OUT}"
-alpha set: Ensures the alpha channel is present and active.-background none: Sets transparent background (must precede-extent).-define png:compression-level=9: Applies maximum PNG compression.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
.github/workflows/generate-thumbnails.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Publish board images to data branch
05c9741 to
e7c4cea
Compare
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: 2
♻️ Duplicate comments (4)
.github/workflows/generate-thumbnails.yml (4)
198-212: Fixboard-images-thumbvsboard-imagesdirectory mismatch (publish gate will always skip).
You download artifacts intoboard-images-thumb(Line 201) but the “Skip publish if no images” step checksboard-images(Line 209), so it can incorrectly exit 0 even when images exist.- name: "Skip publish if no images" run: | - set -euo pipefail - if [ ! -d board-images ] || ! find board-images -type f -name '*.png' -print -quit | grep -q .; then - echo "No images found in board-images, nothing to publish." + if [ ! -d board-images-thumb ] || ! find board-images-thumb -type f -name '*.png' -print -quit | grep -q .; then + echo "No images found in board-images-thumb, nothing to publish." exit 0 fi
227-229: Makedatabranch checkout robust (don’t assume local branch exists).
git checkout datacan fail on a fresh runner if the local branch doesn’t exist.git fetch origin data - git checkout data + git checkout -B data origin/data
167-172: Preserve transparency + apply PNG compression when using-extent.
Currentconvert ... -extentcan introduce a white background unless you set a transparent background first; also no PNG compression tuning is applied.- convert "${ORIGINAL}" -resize "${size}^" -gravity center -extent "${size}" "${OUT}" + convert "${ORIGINAL}" \ + -alpha set \ + -background none \ + -resize "${size}^" \ + -gravity center \ + -extent "${size}" \ + -define png:compression-level=9 \ + "${OUT}"ImageMagick: does `-background none` need to appear before `-extent` to preserve transparency, and is `-define png:compression-level=9` the recommended knob for PNG compression in current ImageMagick (v6/v7)?
95-113: Installtreeif you require it later, or make it non-fatal.
You calltreelater (Line 235) but only installimagemagickhere. On ubuntu runnerstreeis not guaranteed.sudo apt-get update -y - sudo apt-get install -y imagemagick + sudo apt-get install -y imagemagick tree(Alternative: keep
treeas best-effort:command -v tree >/dev/null && tree ... || ls -R ....)
🧹 Nitpick comments (1)
.github/workflows/generate-thumbnails.yml (1)
142-144: Avoid accidentally re-discovering generated outputs duringfind(future-proofing).
If this workflow later runs in a workspace that already containsoutput/images,find .could pick up generated thumbnails as “originals”. Consider excluding./output/(and possibly./.git/) from the search.- mapfile -t matches < <(find . -type f -iname "${BOARD}.png" | sort || true) + mapfile -t matches < <(find . -type f -iname "${BOARD}.png" \ + -not -path "./output/*" -not -path "./.git/*" | sort || true)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
.github/workflows/generate-thumbnails.yml(1 hunks)
| Check: | ||
| name: "Check permissions" | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: "Check permissions" | ||
| uses: armbian/actions/team-check@main | ||
| with: | ||
| ORG_MEMBERS: ${{ secrets.ORG_MEMBERS }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| TEAM: "Release manager" | ||
|
|
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.
🧩 Analysis chain
🌐 Web query:
armbian/actions/team-check GitHub Action versions releases tags
💡 Result:
I can look that up — do you mean the GitHub repo armbian/actions (an action named team-check) or a repo named armbian/team-check? Please confirm the exact repo URL or owner/repo so I can fetch its releases/tags.
🏁 Script executed:
# Search for any references to armbian/actions in the repository to understand context
rg "armbian/actions" --type yaml -A 2 -B 2Repository: armbian/armbian.github.io
Length of output: 217
🏁 Script executed:
# Search more broadly for armbian references
rg "armbian" -type yml -A 2 -B 2
# Also check if there's any documentation about dependencies or actions used
find . -name "*.md" -o -name "*.txt" | head -20Repository: armbian/armbian.github.io
Length of output: 161
🏁 Script executed:
# Get a general file listing to understand repo structure
git ls-files | head -30Repository: armbian/armbian.github.io
Length of output: 1151
🏁 Script executed:
cat -n .github/workflows/generate-thumbnails.ymlRepository: armbian/armbian.github.io
Length of output: 9527
🏁 Script executed:
# Check if there's any documentation about armbian/actions or action pinning
rg "armbian/actions" .Repository: armbian/armbian.github.io
Length of output: 51
🌐 Web query:
site:github.com armbian/actions team-check releases versions tags
💡 Result:
Found the armbian/actions GitHub repo — it includes a team-check action (path: /team-check) and has tags/releases v1.0 and v1.1. [1][2][3]
Sources
- armbian/actions repository (shows team-check folder). [1]
- Tags page (tags 1.0 — 2023-05-03, 1.1 — 2024-09-26). [2]
- Releases page (1.0 and 1.1 listed). [3]
🏁 Script executed:
# Check if there are any other workflows that might show how armbian/actions is used elsewhere
rg "armbian/actions" --type yamlRepository: armbian/armbian.github.io
Length of output: 217
Pin armbian/actions/team-check to a specific release version for supply-chain safety.
armbian/actions/team-check@main is a moving target. The action publishes releases (v1.0, v1.1); pin to v1.1 or a specific commit SHA instead of @main.
🤖 Prompt for AI Agents
.github/workflows/generate-thumbnails.yml lines 21-31: the workflow uses
armbian/actions/team-check@main which is a moving target; pin this to a fixed
release (e.g., armbian/actions/[email protected]) or to a specific commit SHA to
ensure supply-chain stability; update the uses line to reference the chosen tag
or SHA and commit the change.
542ae2d to
9577786
Compare
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
♻️ Duplicate comments (2)
.github/workflows/generate-thumbnails.yml (2)
187-193: Harden the NetBox jq filter to safely handle missing or null tags.The current filter on lines 191-192 errors when
.tagsis null or missing. Use optional object iteration with fallback to safely handle VMs without tags.curl -sS \ -H "Authorization: Token ${{ secrets.NETBOX_TOKEN }}" \ -H "Accept: application/json; indent=4" \ "${{ secrets.NETBOX_API }}/virtualization/virtual-machines/?limit=500&name__empty=false&status=active" \ - | jq '.results[] - | select([.tags[].name] | index("cache")) - | {id, name, custom_fields}' > servers.json + | jq '.results[] + | select((.tags // []) | any(.name == "cache")) + | {id, name, custom_fields}' > servers.jsonThe current filter throws
Cannot iterate over nullwhen a VM has no tags. The fix uses(.tags // [])to provide an empty array fallback andany()for safe filtering.
165-170: Add transparency and PNG compression flags to ImageMagick command.The current convert command on line 169 has two issues:
-extentfills added canvas with white by default (the background color must be explicitly set tononefor transparency)- No PNG compression level specified, resulting in larger file sizes
for size in ${SIZES}; do mkdir -p "output/images/${size}" OUT="output/images/${size}/${BOARD}.png" echo "Generating ${OUT}" - convert "${ORIGINAL}" -resize "${size}^" -gravity center -extent "${size}" "${OUT}" + convert "${ORIGINAL}" \ + -alpha set \ + -background none \ + -resize "${size}^" \ + -gravity center \ + -extent "${size}" \ + -define png:compression-level=9 \ + "${OUT}" done
-alpha set: Ensures the alpha channel is present and active for transparency handling-background none: Sets transparent background for canvas operations (must precede-extent)-define png:compression-level=9: Applies maximum PNG compression
🧹 Nitpick comments (1)
.github/workflows/generate-thumbnails.yml (1)
115-180: Verify shard-based processing handles board indexing correctly.The sharding logic at lines 133-136 uses modulo on a sequential index (
idx % SHARDS == SHARD). Confirm that:
- The board ordering from
all-boards.txtis stable across runs (jq produces deterministic output)- No boards are skipped or double-processed due to concurrent shard execution
- The incremental counter correctly maps all boards to exactly one shard
Test the sharding logic with a sample board list to ensure even distribution and no gaps.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
.github/workflows/generate-thumbnails.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Generate board images (2)
- GitHub Check: Generate board images (3)
- GitHub Check: Generate board images (1)
- GitHub Check: Generate board images (0)
🔇 Additional comments (1)
.github/workflows/generate-thumbnails.yml (1)
21-31: Pinarmbian/actions/team-checkto a specific release version.The action is pinned to
@main, which is a moving target. Use a fixed release tag (v1.1) or commit SHA for supply-chain stability.- name: "Check permissions" - uses: armbian/actions/team-check@main + uses: armbian/actions/[email protected] with: ORG_MEMBERS: ${{ secrets.ORG_MEMBERS }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TEAM: "Release manager"
be62966 to
60adddc
Compare
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
♻️ Duplicate comments (3)
.github/workflows/generate-thumbnails.yml (3)
21-31: Pinarmbian/actions/team-check(avoid@main).
armbian/actions/team-check@mainis a moving target; pin to a release tag or SHA.- uses: armbian/actions/team-check@main + uses: armbian/actions/[email protected]
170-185: Make thumbnail generation preserve alpha + use real PNG compression; don’t fail hard onpngquant.
-quality 90isn’t a dependable PNG compression control.pngquantcan fail for some PNGs; withset -ethis aborts the job.convert "${ORIGINAL}" \ -resize "${width}>" \ + -alpha set \ -strip \ - -quality 90 \ + -define png:compression-level=9 \ "${OUT}" # Optional but recommended, if you installed pngquant: - pngquant --quality=65-85 --speed 1 --force --output "${OUT}" "${OUT}" + pngquant --quality=65-85 --speed 1 --force --output "${OUT}" "${OUT}" "${OUT}" || true
201-209: Harden NetBox jq filter for missing/null.tags.Current
.tags[].namecan throw whentagsis null/missing.- | jq '.results[] - | select([.tags[].name] | index("cache")) - | {id, name, custom_fields}' > servers.json + | jq '.results[] + | select((.tags // []) | any(.name == "cache")) + | {id, name, custom_fields}' > servers.json
🧹 Nitpick comments (2)
.github/workflows/generate-thumbnails.yml (2)
94-111: Prefer pinning 3rd-party actions by SHA (supply-chain hardening).Consider pinning
shimataro/ssh-key-action@v2and evenactions/checkout@v4to commit SHAs to reduce risk from tag retargeting.
140-163: Avoid accidentally picking generated outputs as “originals” (excludeoutput/).If the repo ever contains
output/images/**(or if this step is refactored to reuse a workspace),find .can pick derived images. Safer to exclude.- mapfile -t matches < <(find . -type f -iname "${BOARD}.png" | sort || true) + mapfile -t matches < <(find . -type f -iname "${BOARD}.png" -not -path './output/*' | sort || true)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
.github/workflows/generate-thumbnails.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Generate board images (1)
- GitHub Check: Generate board images (3)
- GitHub Check: Generate board images (0)
14dff50 to
382217b
Compare
62c1352 to
a5479f9
Compare
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
♻️ Duplicate comments (3)
.github/workflows/generate-thumbnails.yml (3)
141-141: Exclude generated output/ directory from find to prevent self-matching on reruns.The find command can match previously-generated thumbnails under
output/images/on subsequent runs, treating them as the original source image. Add a path exclusion:- mapfile -t matches < <(find . -type f -iname "${BOARD}.png" | sort || true) + mapfile -t matches < <(find . -type f -iname "${BOARD}.png" -not -path "./output/*" | sort || true)
220-244: Critical: NetBox jq filter is null-unsafe, uses broken index logic, and produces non-array JSON; upload loop will fail to parse.The filter has three fatal issues:
- Null-safety:
.tags[]errors if.tagsis null or missing.- Broken index logic:
[.tags[].name] | index("cache")returns position (0, 1, 2...) or null. When "cache" is at position 0,index()returns 0 (falsy), andselect()incorrectly rejects it.- Non-array output: The filter produces a stream of objects, but line 229 consumes it as a JSON array with
jq -r '@base64', causing a parse error.Fix the jq filter to produce a valid JSON array and use safe tag matching:
curl -sS \ -H "Authorization: Token ${{ secrets.NETBOX_TOKEN }}" \ -H "Accept: application/json; indent=4" \ "${{ secrets.NETBOX_API }}/virtualization/virtual-machines/?limit=500&name__empty=false&status=active" \ - | jq '.results[] - | select([.tags[].name] | index("cache")) - | {id, name, custom_fields}' > servers.json + | jq '[ + .results[] + | select((.tags // []) | any(.name == "cache")) + | {id, name, custom_fields} + ]' > servers.json if [[ ! -s servers.json ]]; then echo "No cache servers returned from NetBox query, nothing to upload." exit 0 fi - for row in $(jq -r '@base64' servers.json); do + for row in $(jq -r '.[] | @base64' servers.json); doExplanation:
[...]wraps the filter output into a JSON array.(.tags // [])defaults null/missing tags to an empty array.any(.name == "cache")returns true if any tag matches; correctly handles position-0 matches.jq -r '.[] | @base64'iterates over the array and base64-encodes each element.
174-178: Critical: ImageMagick command missing transparency and PNG compression flags required by PR objectives.The current command lacks three essential flags that directly address PR goals:
- Transparency preservation:
-alpha set -background none(before-extentif used) prevents white fill of padding.- PNG compression:
-quality 90targets JPEG; PNG requires-define png:compression-level=9.Without these, thumbnails will have white backgrounds instead of transparency and will not be optimally compressed.
if ! convert "${ORIGINAL}" \ + -alpha set \ + -background none \ -resize "${width}>" \ -strip \ + -define png:compression-level=9 \ -quality 90 \ "${OUT}"; then
🧹 Nitpick comments (3)
README.md (1)
44-44: Quote the href URL to comply with HTML/Markdown standards.The href attribute value should be quoted. This also resolves the markdownlint MD034 warning.
-<a href=https://github.com/armbian/armbian.github.io/actions/workflows/generate-board-images.yml><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/armbian/armbian.github.io/generate-board-images.yml?logo=githubactions&label=Status&style=for-the-badge&branch=main&logoColor=white"></a> +<a href="https://github.com/armbian/armbian.github.io/actions/workflows/generate-board-images.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/armbian/armbian.github.io/generate-board-images.yml?logo=githubactions&label=Status&style=for-the-badge&branch=main&logoColor=white"></a>.github/workflows/generate-thumbnails.yml (2)
26-26: Pinarmbian/actions/team-checkto a specific release version for supply-chain safety.Using
@mainis a moving target. Per the past review, the action publishes releases (v1.0, v1.1). Pin to a stable version instead.- uses: armbian/actions/team-check@main + uses: armbian/actions/[email protected]
200-209: Initialize summary files at the start of the job to avoid conditional overhead.The code conditionally checks for file existence (line 207) to avoid
caterrors underset -euo pipefail. While the conditional works, explicit initialization is clearer and avoids edge cases:echo "Shard: ${SHARD}/${SHARDS}" echo "Widths: ${WIDTHS}" + touch processed.md missing.md + # Parse boards JSON into a simple newline list
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (174)
board-images/aml-c400-plus.pngis excluded by!**/*.pngboard-images/aml-s805-mxq.pngis excluded by!**/*.pngboard-images/aml-t95z-plus.pngis excluded by!**/*.pngboard-images/armsom-aim7-io.pngis excluded by!**/*.pngboard-images/armsom-cm5-io.pngis excluded by!**/*.pngboard-images/armsom-cm5-rpi-cm4-io.pngis excluded by!**/*.pngboard-images/armsom-forge1.pngis excluded by!**/*.pngboard-images/armsom-sige1.pngis excluded by!**/*.pngboard-images/armsom-sige3.pngis excluded by!**/*.pngboard-images/armsom-sige5.pngis excluded by!**/*.pngboard-images/armsom-sige7.pngis excluded by!**/*.pngboard-images/armsom-w3.pngis excluded by!**/*.pngboard-images/bananapicm4io.pngis excluded by!**/*.pngboard-images/bananapim1plus.pngis excluded by!**/*.pngboard-images/bananapim2ultra.pngis excluded by!**/*.pngboard-images/bananapim4berry.pngis excluded by!**/*.pngboard-images/bananapim5pro.pngis excluded by!**/*.pngboard-images/bananapir2pro.pngis excluded by!**/*.pngboard-images/bananapir4.pngis excluded by!**/*.pngboard-images/beaglebone-ai64.pngis excluded by!**/*.pngboard-images/beagleplay.pngis excluded by!**/*.pngboard-images/beagley-ai.pngis excluded by!**/*.pngboard-images/bigtreetech-cb1.pngis excluded by!**/*.pngboard-images/bigtreetech-cb2.pngis excluded by!**/*.pngboard-images/clockworkpi-a06.pngis excluded by!**/*.pngboard-images/cm3588-nas.pngis excluded by!**/*.pngboard-images/coolpi-cm5.pngis excluded by!**/*.pngboard-images/coolpi-genbook.pngis excluded by!**/*.pngboard-images/cubieboard.pngis excluded by!**/*.pngboard-images/cyber-aib-rk3588.pngis excluded by!**/*.pngboard-images/dshanpi-a1.pngis excluded by!**/*.pngboard-images/dshanpi-r1.pngis excluded by!**/*.pngboard-images/dusun-dsom-010r.pngis excluded by!**/*.pngboard-images/firefly-itx-3588j.pngis excluded by!**/*.pngboard-images/fxblox-rk1.pngis excluded by!**/*.pngboard-images/h96-tvbox-3566.pngis excluded by!**/*.pngboard-images/hinlink-h28k.pngis excluded by!**/*.pngboard-images/hinlink-h66k.pngis excluded by!**/*.pngboard-images/hinlink-h68k.pngis excluded by!**/*.pngboard-images/hinlink-ht2.pngis excluded by!**/*.pngboard-images/indiedroid-nova.pngis excluded by!**/*.pngboard-images/jp-tvbox-3566.pngis excluded by!**/*.pngboard-images/khadas-vim1s.pngis excluded by!**/*.pngboard-images/lckfb-taishanpi.pngis excluded by!**/*.pngboard-images/leez-p710.pngis excluded by!**/*.pngboard-images/longanpi-3h.pngis excluded by!**/*.pngboard-images/luckfox-core3566.pngis excluded by!**/*.pngboard-images/luckfox-lyra-plus.pngis excluded by!**/*.pngboard-images/luckfox-lyra-ultra-w.pngis excluded by!**/*.pngboard-images/luckfox-lyra-zero-w.pngis excluded by!**/*.pngboard-images/luckfox-pico-max.pngis excluded by!**/*.pngboard-images/luckfox-pico-mini.pngis excluded by!**/*.pngboard-images/mba8mpxl-ras314.pngis excluded by!**/*.pngboard-images/mba8mpxl.pngis excluded by!**/*.pngboard-images/mekotronics-r58-4x4.pngis excluded by!**/*.pngboard-images/mekotronics-r58-minipc.pngis excluded by!**/*.pngboard-images/mekotronics-r58hd.pngis excluded by!**/*.pngboard-images/mekotronics-r58x-4g.pngis excluded by!**/*.pngboard-images/mekotronics-r58x.pngis excluded by!**/*.pngboard-images/melea1000.pngis excluded by!**/*.pngboard-images/mixtile-edge2.pngis excluded by!**/*.pngboard-images/mk808c.pngis excluded by!**/*.pngboard-images/mksklipad50.pngis excluded by!**/*.pngboard-images/musepipro.pngis excluded by!**/*.pngboard-images/nanopct6-lts.pngis excluded by!**/*.pngboard-images/nanopct6.pngis excluded by!**/*.pngboard-images/nanopi-m5.pngis excluded by!**/*.pngboard-images/nanopi-r2c.pngis excluded by!**/*.pngboard-images/nanopi-r3s-lts.pngis excluded by!**/*.pngboard-images/nanopi-r3s.pngis excluded by!**/*.pngboard-images/nanopi-r4s.pngis excluded by!**/*.pngboard-images/nanopi-r4se.pngis excluded by!**/*.pngboard-images/nanopi-r5c.pngis excluded by!**/*.pngboard-images/nanopi-r5s.pngis excluded by!**/*.pngboard-images/nanopi-r6c.pngis excluded by!**/*.pngboard-images/nanopi-r6s.pngis excluded by!**/*.pngboard-images/nanopi-r76s.pngis excluded by!**/*.pngboard-images/nanopiair.pngis excluded by!**/*.pngboard-images/nanopiduo2.pngis excluded by!**/*.pngboard-images/nanopik2-s905.pngis excluded by!**/*.pngboard-images/nanopineocore2.pngis excluded by!**/*.pngboard-images/nanopineoplus2.pngis excluded by!**/*.pngboard-images/odroidm1s.pngis excluded by!**/*.pngboard-images/odroidm2.pngis excluded by!**/*.pngboard-images/odroidn2l.pngis excluded by!**/*.pngboard-images/olimex-a20-olinuxino-micro.pngis excluded by!**/*.pngboard-images/olimex-teres-a64.pngis excluded by!**/*.pngboard-images/olinux-som-a13.pngis excluded by!**/*.pngboard-images/orangepi-r1.pngis excluded by!**/*.pngboard-images/orangepi-r1plus-lts.pngis excluded by!**/*.pngboard-images/orangepi4-lts.pngis excluded by!**/*.pngboard-images/orangepi5-plus.pngis excluded by!**/*.pngboard-images/orangepi5-ultra.pngis excluded by!**/*.pngboard-images/orangepi5b.pngis excluded by!**/*.pngboard-images/panther-x2.pngis excluded by!**/*.pngboard-images/phytiumpi.pngis excluded by!**/*.pngboard-images/pine64so.pngis excluded by!**/*.pngboard-images/pinebook-pro.pngis excluded by!**/*.pngboard-images/pineh64-b.pngis excluded by!**/*.pngboard-images/pineh64.pngis excluded by!**/*.pngboard-images/pocketbeagle2.pngis excluded by!**/*.pngboard-images/pocketchip-sd.pngis excluded by!**/*.pngboard-images/quartz64b.pngis excluded by!**/*.pngboard-images/radxa-cm4-io.pngis excluded by!**/*.pngboard-images/radxa-cm5-io.pngis excluded by!**/*.pngboard-images/radxa-cubie-a5e.pngis excluded by!**/*.pngboard-images/radxa-dragon-q6a.pngis excluded by!**/*.pngboard-images/radxa-e20c.pngis excluded by!**/*.pngboard-images/radxa-e24c.pngis excluded by!**/*.pngboard-images/radxa-e52c.pngis excluded by!**/*.pngboard-images/radxa-e54c.pngis excluded by!**/*.pngboard-images/radxa-nio-12l.pngis excluded by!**/*.pngboard-images/radxa-rock-4d.pngis excluded by!**/*.pngboard-images/radxa-zero.pngis excluded by!**/*.pngboard-images/radxa-zero3.pngis excluded by!**/*.pngboard-images/recore.pngis excluded by!**/*.pngboard-images/retro-lite-cm5.pngis excluded by!**/*.pngboard-images/retroidpocket-rp5.pngis excluded by!**/*.pngboard-images/retroidpocket-rpmini.pngis excluded by!**/*.pngboard-images/rk322x-box.pngis excluded by!**/*.pngboard-images/rk3318-box.pngis excluded by!**/*.pngboard-images/rock-2a.pngis excluded by!**/*.pngboard-images/rock-2f.pngis excluded by!**/*.pngboard-images/rock-3a.pngis excluded by!**/*.pngboard-images/rock-3c.pngis excluded by!**/*.pngboard-images/rock-4se.pngis excluded by!**/*.pngboard-images/rock-5-cmio.pngis excluded by!**/*.pngboard-images/rock-5-itx.pngis excluded by!**/*.pngboard-images/rock-5a.pngis excluded by!**/*.pngboard-images/rock-5b-plus.pngis excluded by!**/*.pngboard-images/rock-5b.pngis excluded by!**/*.pngboard-images/rock-5c.pngis excluded by!**/*.pngboard-images/rock-5t.pngis excluded by!**/*.pngboard-images/rock-s0.pngis excluded by!**/*.pngboard-images/rockpi-4a.pngis excluded by!**/*.pngboard-images/rockpi-4b.pngis excluded by!**/*.pngboard-images/rockpi-4bplus.pngis excluded by!**/*.pngboard-images/rockpi-4c.pngis excluded by!**/*.pngboard-images/rockpi-4cplus.pngis excluded by!**/*.pngboard-images/rockpi-e.pngis excluded by!**/*.pngboard-images/rockpi-n10.pngis excluded by!**/*.pngboard-images/sakurapi-rk3308b.pngis excluded by!**/*.pngboard-images/sk-am62a.pngis excluded by!**/*.pngboard-images/sk-am62b.pngis excluded by!**/*.pngboard-images/sk-am62p.pngis excluded by!**/*.pngboard-images/sk-am68.pngis excluded by!**/*.pngboard-images/sk-am69.pngis excluded by!**/*.pngboard-images/sk-tda4vm.pngis excluded by!**/*.pngboard-images/smart-am40.pngis excluded by!**/*.pngboard-images/station-m2.pngis excluded by!**/*.pngboard-images/station-m3.pngis excluded by!**/*.pngboard-images/sunvell-r69.pngis excluded by!**/*.pngboard-images/tanix-tx6.pngis excluded by!**/*.pngboard-images/thinkpad-x13s.pngis excluded by!**/*.pngboard-images/tinker-edge-r.pngis excluded by!**/*.pngboard-images/tinkerboard-2.pngis excluded by!**/*.pngboard-images/tinkerboard.pngis excluded by!**/*.pngboard-images/tmds62levm.pngis excluded by!**/*.pngboard-images/tritium-h3.pngis excluded by!**/*.pngboard-images/tritium-h5.pngis excluded by!**/*.pngboard-images/uefi-arm64.pngis excluded by!**/*.pngboard-images/uefi-riscv64.pngis excluded by!**/*.pngboard-images/uefi-x86.pngis excluded by!**/*.pngboard-images/x96-mate.pngis excluded by!**/*.pngboard-images/x96q.pngis excluded by!**/*.pngboard-images/xt-q8l-v10.pngis excluded by!**/*.pngboard-images/youyeetoo-yy3588.pngis excluded by!**/*.pngboard-images/zeropi.pngis excluded by!**/*.pngboard-vendor-logos/allwinner-logo.pngis excluded by!**/*.pngboard-vendor-logos/amlogic-logo.pngis excluded by!**/*.pngboard-vendor-logos/asus-logo.pngis excluded by!**/*.pngboard-vendor-logos/beagleboard-logo.pngis excluded by!**/*.pngboard-vendor-logos/beelink-logo.pngis excluded by!**/*.pngboard-vendor-logos/cool-pi-logo.pngis excluded by!**/*.png
📒 Files selected for processing (2)
.github/workflows/generate-thumbnails.yml(1 hunks)README.md(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
README.md
44-44: Bare URL used
(MD034, no-bare-urls)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Generate board images (3)
- GitHub Check: Generate board images (2)
- GitHub Check: Generate board images (0)
- GitHub Check: Generate board images (1)
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: 2
♻️ Duplicate comments (2)
.github/workflows/generate-thumbnails.yml (2)
309-311: Fix NetBox jq filter: handle null tags and correct tag matching logic.The jq filter has two critical issues:
- Null-safety:
.tags[]will error if.tagsis null or missing on any VM.- Faulty index logic:
[.tags[].name] | index("cache")returns position (0, 1, 2...) or null. When "cache" is at position 0,index()returns 0 (falsy), andselect()incorrectly rejects it.curl -sS \ -H "Authorization: Token ${{ secrets.NETBOX_TOKEN }}" \ -H "Accept: application/json; indent=4" \ "${{ secrets.NETBOX_API }}/virtualization/virtual-machines/?limit=500&name__empty=false&status=active" \ - | jq '.results[] - | select([.tags[].name] | index("cache")) - | {id, name, custom_fields}' > servers.json + | jq '.results[] + | select((.tags // []) | any(.name == "cache")) + | {id, name, custom_fields}' > servers.json
(.tags // []): Defaults null/missing tags to an empty array, preventing errors.any(.name == "cache"): Returns true if any tag matches; correctly handles position-0 tags.
193-200: Add transparency preservation flags to ImageMagick command.The convert command lacks flags needed to preserve transparency during resizing. Without
-alpha set -background none, the resize operation can default to opaque backgrounds, destroying transparency in source PNG images.if ! convert "${ORIGINAL}" \ + -alpha set \ + -background none \ -resize "${width}>" \ -strip \ -quality 90 \ "${OUT}"; then
-alpha set: Ensures the alpha channel is active for transparency preservation.-background none: Sets a transparent background before resize operations to prevent white/opaque padding.Note:
-quality 90already provides PNG compression level 9 (via the tens digit), so no additional compression flag is needed.
🧹 Nitpick comments (2)
.github/workflows/generate-thumbnails.yml (2)
27-27: Pinarmbian/actions/team-checkto a specific release version.Using
@mainis a moving target and introduces supply-chain risk. The action publishes releases (v1.0, v1.1); pin to a specific version like@v1.1.- uses: armbian/actions/team-check@main + uses: armbian/actions/[email protected]
309-318: Consolidate servers.json into a proper JSON array for clarity and robustness.The jq filter currently outputs a stream of individual objects to
servers.json, which happens to work with the base64 iteration (line 318) but is fragile and non-obvious. Wrap the filter output in[...]to produce a single JSON array, then iterate with.[] | @base64for clarity.| jq '[ .results[] | select((.tags // []) | any(.name == "cache")) | {id, name, custom_fields} ]' > servers.json if [[ ! -s servers.json ]]; then echo "No cache servers returned from NetBox query, nothing to upload." exit 0 fi - for row in $(jq -r '@base64' servers.json); do + for row in $(jq -r '.[] | @base64' servers.json); doThis clarifies that
servers.jsonis an array and makes the iteration intent explicit.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
.github/workflows/generate-thumbnails.yml(1 hunks)
🔇 Additional comments (1)
.github/workflows/generate-thumbnails.yml (1)
175-175: No fix needed for the find command on line 175.The concern about matching previously-generated thumbnails is not valid. The
findcommand searches only inboard-images/(the source directory), while generated output is written to a separateoutput/images/directory. These directories are independent, so the find command cannot match thumbnails from prior runs.Likely an incorrect or invalid review comment.
acde47e to
aa76baa
Compare
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: 1
♻️ Duplicate comments (3)
.github/workflows/generate-thumbnails.yml (3)
22-31: Pinarmbian/actions/team-check(avoid@main) for supply-chain stability.
armbian/actions/team-check@maincan change without notice; pin to a release tag or commit SHA.- uses: armbian/actions/team-check@main + uses: armbian/actions/[email protected]
194-206: Board/vendor thumbnailconvertcommands don’t enforce transparency + PNG compression (and-qualityis misleading for PNG).This conflicts with the stated goal “preserves aspect ratio and transparency” + “optimizes images for web delivery”. Add explicit alpha/background and PNG compression defines (apply similarly for vendor SVG render, vendor normalization, and vendor thumbnails).
if ! convert "${ORIGINAL}" \ + -alpha set \ + -background none \ -resize "${width}>" \ -strip \ - -quality 90 \ + -define png:compression-level=9 \ "${OUT}"; then echo "WARN: convert failed for ${BOARD} width ${width}" >&2 continue fi @@ if [[ "${VORIG,,}" == *.svg ]]; then - if ! convert -background none -density 300 "${VORIG}" -strip "output/images/vendors/original/${out_name}"; then + if ! convert -alpha set -background none -density 300 "${VORIG}" \ + -strip -define png:compression-level=9 \ + "output/images/vendors/original/${out_name}"; then echo "WARN: failed to render SVG for ${VENDOR}" >&2 vidx=$((vidx + 1)) continue fi else - if ! convert "${VORIG}" -strip "output/images/vendors/original/${out_name}"; then + if ! convert "${VORIG}" -alpha set -background none \ + -strip -define png:compression-level=9 \ + "output/images/vendors/original/${out_name}"; then echo "WARN: failed to normalize logo for ${VENDOR}" >&2 vidx=$((vidx + 1)) continue fi fi @@ if ! convert "output/images/vendors/original/${out_name}" \ + -alpha set \ + -background none \ -resize "${width}>" \ -strip \ - -quality 90 \ + -define png:compression-level=9 \ "${OUT}"; thenAlso applies to: 252-276
306-332: NetBox jq selection +servers.jsonformat will break upload loop (null-unsafe + stream vs array).
.tags[]errors when tags is null/missing.index("cache")returns0for the first match (falsy), dropping valid cache servers.servers.jsonis written as a stream but later consumed as a single JSON value and looped incorrectly.curl -sS \ -H "Authorization: Token ${{ secrets.NETBOX_TOKEN }}" \ -H "Accept: application/json; indent=4" \ "${{ secrets.NETBOX_API }}/virtualization/virtual-machines/?limit=500&name__empty=false&status=active" \ - | jq '.results[] - | select([.tags[].name] | index("cache")) - | {id, name, custom_fields}' > servers.json + | jq '[ + .results[] + | select((.tags // []) | any(.name == "cache")) + | {id, name, custom_fields} + ]' > servers.json @@ - if [[ ! -s servers.json ]]; then + if jq -e 'length == 0' servers.json >/dev/null; then echo "No cache servers returned from NetBox query, nothing to upload." exit 0 fi @@ - for row in $(jq -r '@base64' servers.json); do + for row in $(jq -r '.[] | @base64' servers.json); do _jq() { echo "${row}" | base64 --decode | jq -r "${1}"; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
board-vendor-logos/arm-logo.pngis excluded by!**/*.png
📒 Files selected for processing (1)
.github/workflows/generate-thumbnails.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Generate board + vendor images (2)
- GitHub Check: Generate board + vendor images (0)
- GitHub Check: Generate board + vendor images (3)
- GitHub Check: Generate board + vendor images (1)
c7d3ec0 to
4ff08e2
Compare
14f1def to
d1f8e76
Compare
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: 1
♻️ Duplicate comments (3)
.github/workflows/generate-thumbnails.yml (3)
252-265: Vendor “original normalization” should set alpha + PNG compression (both SVG and raster paths).if [[ "${VORIG,,}" == *.svg ]]; then - if ! convert -background none -density 300 "${VORIG}" -strip "output/images/vendors/original/${out_name}"; then + if ! convert -alpha set -background none -density 300 "${VORIG}" \ + -define png:compression-level=9 \ + -strip "output/images/vendors/original/${out_name}"; then echo "WARN: failed to render SVG for ${VENDOR}" >&2 vidx=$((vidx + 1)) continue fi else - if ! convert "${VORIG}" -strip "output/images/vendors/original/${out_name}"; then + if ! convert "${VORIG}" -alpha set -background none \ + -define png:compression-level=9 \ + -strip "output/images/vendors/original/${out_name}"; then echo "WARN: failed to normalize logo for ${VENDOR}" >&2 vidx=$((vidx + 1)) continue fi fi
308-334: NetBox parsing/upload loop is currently broken (null-unsafe tags + wrong JSON shape + wrong jq iteration).
.tags[]can error when tags is null/missing.index("cache")is falsy at position 0.servers.jsonis written as an object stream, but later treated like a single JSON value;jq -r '@base64' servers.jsonwon’t iterate objects.curl -sS \ -H "Authorization: Token ${{ secrets.NETBOX_TOKEN }}" \ -H "Accept: application/json; indent=4" \ "${{ secrets.NETBOX_API }}/virtualization/virtual-machines/?limit=500&name__empty=false&status=active" \ - | jq '.results[] - | select([.tags[].name] | index("cache")) - | {id, name, custom_fields}' > servers.json + | jq '[ + .results[] + | select((.tags // []) | any(.name == "cache")) + | {id, name, custom_fields} + ]' > servers.json @@ - if [[ ! -s servers.json ]]; then + if jq -e 'length == 0' servers.json >/dev/null; then echo "No cache servers returned from NetBox query, nothing to upload." exit 0 fi @@ - for row in $(jq -r '@base64' servers.json); do + for row in $(jq -r '.[] | @base64' servers.json); do _jq() { echo "${row}" | base64 --decode | jq -r "${1}"; }
69-75: Avoid non-stableref: igorpecovnik-patch-3forarmbian/buildcheckout. Using a feature branch instead of the stablemainbranch reduces reproducibility and makes the workflow fragile to upstream branch changes. Switch to the default stable branch:- name: "Checkout armbian/build" uses: actions/checkout@v4 with: repository: armbian/build path: build - ref: igorpecovnik-patch-3 + ref: main
🧹 Nitpick comments (1)
.github/workflows/generate-thumbnails.yml (1)
26-32: Pinarmbian/actions/team-checkto a specific version tag or commit SHA instead of@main.The repository consistently pins external actions to specific versions (e.g.,
@v4,@v8), butarmbian/actionsuses@main, which can introduce unexpected behavior changes. Verify the available versions in the armbian/actions repository and update the pinning accordingly.- uses: armbian/actions/team-check@main + uses: armbian/actions/team-check@<version>Note: This pattern appears in other workflows (
generate-runners-status.yml,generate-redirector-config.yml) as well.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (25)
board-images/9tripod-x3568-v4.pngis excluded by!**/*.pngboard-images/aml-a311d-cc.pngis excluded by!**/*.pngboard-images/aml-s905d3-cc.pngis excluded by!**/*.pngboard-images/aml-s9xx-box.pngis excluded by!**/*.pngboard-images/bananapim5.pngis excluded by!**/*.pngboard-images/cherryba-m1.pngis excluded by!**/*.pngboard-images/hinlink-h88k.pngis excluded by!**/*.pngboard-images/imb3588.pngis excluded by!**/*.pngboard-images/jethubj100.pngis excluded by!**/*.pngboard-images/jethubj80.pngis excluded by!**/*.pngboard-images/khadas-edge.pngis excluded by!**/*.pngboard-images/kickpik2b.pngis excluded by!**/*.pngboard-images/lime.pngis excluded by!**/*.pngboard-images/lubancat2.pngis excluded by!**/*.pngboard-images/mangopi-m28k.pngis excluded by!**/*.pngboard-images/mekotronics-r58x-pro.pngis excluded by!**/*.pngboard-images/nanopi-r1s-h5.pngis excluded by!**/*.pngboard-images/nanopi-r2s-plus.pngis excluded by!**/*.pngboard-images/onecloud.pngis excluded by!**/*.pngboard-images/qemu-uboot-arm64.pngis excluded by!**/*.pngboard-images/qemu-uboot-x86.pngis excluded by!**/*.pngboard-images/qemu-uefi-x86.pngis excluded by!**/*.pngboard-images/rk3328-heltec.pngis excluded by!**/*.pngboard-images/roc-rk3399-pc.pngis excluded by!**/*.pngboard-images/rock-5-cm-rpi-cm4-io.pngis excluded by!**/*.png
📒 Files selected for processing (1)
.github/workflows/generate-thumbnails.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Generate board + vendor images (0)
- GitHub Check: Generate board + vendor images (2)
- GitHub Check: Generate board + vendor images (1)
- GitHub Check: Generate board + vendor images (3)
67605f2 to
e1cb522
Compare
e1cb522 to
475c353
Compare
Purpose
Establish consistent image naming and automated image distribution for both boards and vendors.
Description
This change enforces consistent naming with a 1:1 relationship between:
<board>.png)<vendor>.png)When a PNG image is added to
board-images/(boards) orboard-vendor-logos/(vendors) and matches the corresponding name, automation:Images are published under stable, predictable URL schemes, for example:
Board image (size 300):

https://cache.armbian.com/images/300/uefi-x86.png
Vendor logo (size 300):

https://cache.armbian.com/images/vendors/300/radxa.png
This guarantees consistent naming, automated thumbnail generation, and reliable image availability across mirrors.