mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-18 17:23:52 +08:00
CI: use tags for cppcheck update
cppcheck doesn't always create a release for each tag
This commit is contained in:
6
.github/workflows/update-cppcheck.yml
vendored
6
.github/workflows/update-cppcheck.yml
vendored
@@ -17,7 +17,11 @@ jobs:
|
||||
- name: Get latest cppcheck version
|
||||
id: version
|
||||
run: |
|
||||
LATEST=$(curl -fsSL https://api.github.com/repos/danmar/cppcheck/releases/latest | jq -r .tag_name)
|
||||
# Tags are sorted by time (newest first), so get the first version-like tag
|
||||
LATEST=$(curl -fsSL "https://api.github.com/repos/danmar/cppcheck/tags?per_page=20" | \
|
||||
jq -r '.[].name' | \
|
||||
grep -E '^[0-9]+\.[0-9]+(\.[0-9]+)?$' | \
|
||||
head -n 1)
|
||||
echo "vers=$LATEST" >> "$GITHUB_OUTPUT"
|
||||
- name: Update VERS in install.sh
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user