Skip to content

Commit 667c076

Browse files
authored
Update check-badges.yml
1 parent e365d6b commit 667c076

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

.github/workflows/check-badges.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ jobs:
2323
run: sudo apt-get install jq
2424

2525
- name: Check Latest Release URLs
26+
id: check-releases
2627
env:
2728
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Use GitHub Actions built-in token
2829
run: |
2930
BADGES_FILE="../badges.json"
3031
OUTDATED_PLUGINS=0
32+
REPORT="### 📢 Outdated Plugin Report\n\n@GarlicRot, some plugins have outdated release URLs!\n\n"
3133
3234
echo "🔍 Checking latest releases for themes and plugins..."
3335
@@ -80,15 +82,29 @@ jobs:
8082
# Compare stored latest release URL with actual one
8183
if [[ "$LATEST_STORED" != "$LATEST_RELEASE" ]]; then
8284
echo "::error file=badges.json,title=Outdated Plugin::$OWNER/$REPO is outdated."
83-
echo "::error file=badges.json,title=Expected::$LATEST_STORED"
84-
echo "::error file=badges.json,title=Latest::$LATEST_RELEASE"
85+
REPORT+="🚨 **$OWNER/$REPO**\n"
86+
REPORT+="🔹 **Stored:** [$LATEST_STORED]($LATEST_STORED)\n"
87+
REPORT+="🔹 **Latest:** [$LATEST_RELEASE]($LATEST_RELEASE)\n\n"
8588
echo "-----------------------------------"
8689
OUTDATED_PLUGINS=1
8790
fi
8891
done
8992
done
9093
91-
if [[ $OUTDATED_PLUGINS -eq 1 ]]; then
92-
echo "::error:: Some plugins/themes have outdated release URLs! Check annotations for details."
93-
exit 1
94-
fi
94+
echo "$REPORT" > outdated_plugins_report.md
95+
echo "outdated=$OUTDATED_PLUGINS" >> $GITHUB_ENV
96+
97+
- name: Debug `outdated` Variable
98+
run: echo "outdated=$outdated"
99+
100+
- name: Debug Report Content
101+
run: cat outdated_plugins_report.md
102+
103+
- name: Create GitHub Issue Notification
104+
if: env.outdated == '1'
105+
uses: peter-evans/create-issue-from-file@v4
106+
with:
107+
token: ${{ secrets.GITHUB_TOKEN }}
108+
title: "🚨 Outdated Plugin Report"
109+
content-filepath: outdated_plugins_report.md
110+
labels: bug

0 commit comments

Comments
 (0)