Skip to content

Commit 863d4fa

Browse files
authored
Update check-badges.yml
1 parent d428687 commit 863d4fa

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/check-badges.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ jobs:
2828
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Use GitHub Actions built-in token
2929
run: |
3030
BADGES_FILE="../badges.json"
31-
OUTDATED_PLUGINS=0
31+
OUTDATED_PLUGINS_FILE="/tmp/outdated_plugins_flag"
3232
REPORT="### 📢 Outdated Plugin Report\n\n@GarlicRot, some plugins have outdated release URLs!\n\n"
3333
3434
echo "🔍 Checking latest releases for themes and plugins..."
3535
36+
# Initialize the flag file
37+
echo "0" > $OUTDATED_PLUGINS_FILE
38+
3639
for SECTION in "themes" "plugins"; do
3740
cat $BADGES_FILE | jq -c --arg section "$SECTION" '.[$section][]' | while read entry; do
3841
NAME=$(echo $entry | jq -r '.name')
@@ -86,15 +89,15 @@ jobs:
8689
REPORT+="🔹 **Stored:** [$LATEST_STORED]($LATEST_STORED)\n"
8790
REPORT+="🔹 **Latest:** [$LATEST_RELEASE]($LATEST_RELEASE)\n\n"
8891
echo "-----------------------------------"
89-
OUTDATED_PLUGINS=1
92+
echo "1" > $OUTDATED_PLUGINS_FILE
9093
fi
9194
done
9295
done
9396
9497
echo "$REPORT" > outdated_plugins_report.md
9598
96-
# Explicitly set the `outdated` environment variable
97-
if [[ $OUTDATED_PLUGINS -eq 1 ]]; then
99+
# Export the outdated flag
100+
if [[ $(cat $OUTDATED_PLUGINS_FILE) == "1" ]]; then
98101
echo "outdated=1" >> $GITHUB_ENV
99102
else
100103
echo "outdated=0" >> $GITHUB_ENV

0 commit comments

Comments
 (0)