add support for MOTD
All checks were successful
Update Dispatches / refresh-news (push) Successful in 3s

This commit is contained in:
2026-02-06 08:36:28 -05:00
parent ade8c431cc
commit 6cc57e167b

View File

@@ -15,16 +15,25 @@ jobs:
- name: Generate News and Module List
shell: bash
run: |
# --- News Logic ---
# --- News Logic (The Pinned Dispatch) ---
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" > dispatches.txt
echo " 🔥 DYNASTY REVOLUTION: LATEST DISPATCHES 🔥" >> dispatches.txt
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" >> dispatches.txt
git log -3 --pretty=format:"🔹 [%ad] %s (%an)" --date=format:"%m-%d-%Y" >> dispatches.txt
# Check if your custom header exists in the repo
if [ -f "GLOBAL_NEWS.txt" ]; then
cat GLOBAL_NEWS.txt >> dispatches.txt
echo -e "\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" >> dispatches.txt
else
# Default fallback header if no GLOBAL_NEWS is found
echo " 🔥 DYNASTY REVOLUTION: DISPATCHES 🔥" >> dispatches.txt
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" >> dispatches.txt
fi
# Add the automated Git activity
echo "📜 RECENT SYSTEM ACTIVITY:" >> dispatches.txt
git log -3 --pretty=format:"🔹 [%ad] %s" --date=format:"%m-%d" >> dispatches.txt
echo -e "\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" >> dispatches.txt
# --- Module Manifest Logic ---
# We check if the folder exists first; if not, we create an empty file
# to prevent the "Not Found" error in the installer.
if [ -d "modules" ]; then
ls -1 modules/ > modules_list.txt
else