Skip to content

Commit f0ce3cf

Browse files
Create validate_version_open_vsx.yml
1 parent 6a2f2b7 commit f0ce3cf

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Check Checkmarx Plugin Versions
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- other/validate-plugin-version
8+
schedule:
9+
- cron: "0 * * * *" # every hour
10+
11+
jobs:
12+
check-plugin:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Get latest versions from Open VSX
17+
env:
18+
OPEN_VSX_TOKEN: ${{ secrets.OPEN_VSX_TOKEN }}
19+
run: |
20+
EXTENSIONS=("ast-results" "cx-dev-assist")
21+
22+
for EXT in "${EXTENSIONS[@]}"; do
23+
URL="https://open-vsx.org/api/${EXT}"
24+
25+
if [ -n "$OPEN_VSX_TOKEN" ]; then
26+
RESPONSE=$(curl -s -H "Authorization: Bearer $OPEN_VSX_TOKEN" $URL)
27+
else
28+
RESPONSE=$(curl -s $URL)
29+
fi
30+
31+
VERSION=$(echo "$RESPONSE" | jq -r '.version')
32+
33+
echo "=============================="
34+
echo "Extension: $EXT"
35+
echo "Latest Version: $VERSION"
36+
done

0 commit comments

Comments
 (0)