CI: fix build-docker-args#178
Conversation
Fixes: ``` Failed to parse build_args_file (docker-build-args/docker-build-args.json) ```
WalkthroughThis PR updates the jq asset-selection filter in the CI build script that computes the golangci-lint installation URL. The regex pattern was tightened by adding an end-of-string anchor ( Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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.
Pull request overview
Updates the CI task that generates Docker build arguments to correctly select the golangci-lint release asset URL, preventing invalid docker-build-args.json output that Concourse fails to parse.
Changes:
- Tighten the
jq match(...)pattern forgolangci-lintassets by anchoring it to the end of the filename ($) to avoid unintended matches.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| golangci_lint_install_url="$(curl -H "Authorization: token ${GITHUB_ACCESS_TOKEN}" -s https://api.github.com/repos/golangci/golangci-lint/releases/latest \ | ||
| | jq -r '.assets[] | select(.name | match("golangci-lint-[0-9]+.[0-9]+.[0-9]+-linux-amd64.tar.gz")) | .browser_download_url')" | ||
| | jq -r '.assets[] | select(.name | match("golangci-lint-[0-9]+.[0-9]+.[0-9]+-linux-amd64.tar.gz$")) | .browser_download_url')" |
Fixes:
See similar change: cloudfoundry/bosh@29b4084