@@ -37,25 +37,31 @@ jobs:
3737 fi
3838 fi
3939
40- - name : Check dependencies
40+ - name : Update CI/CD status
41+ env :
42+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43+ GITHUB_REPOSITORY : ${{ github.repository }}
4144 run : |
42- cd backend || exit 0
43- if [ -f requirements.txt ]; then
44- echo "### Dependency Check " >> ../. github/deps_status .md
45- echo "Last checked: $(date -u '+%Y-%m-%d %H:%M:%S UTC')" >> ../.github/deps_status.md
46- echo '```' >> ../ .github/deps_status.md
47- cat requirements.txt >> ../.github/deps_status.md
48- echo '```' >> ../. github/deps_status .md
49- fi
45+ echo "# CI/CD Status" > .github/ci_status.md
46+ echo "Last sync: $(date -u)" >> .github/ci_status.md
47+ echo "" >> .github/ci_status .md
48+ curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
49+ "https://api .github.com/repos/$GITHUB_REPOSITORY/actions/runs?per_page=5" | \
50+ grep -o '"name":"[^"]*"|"conclusion":"[^"]*"' | \
51+ sed 's/"name":"/Workflow: /g' | sed 's/","|"conclusion":"/ - /g' >> .github/ci_status .md || \
52+ echo "Status unavailable" >> .github/ci_status.md
5053
5154 - name : Commit and push
5255 run : |
5356 git config --global user.name "HOLYKEYZ"
5457 git config --global user.email "ayandajoseph390@gmail.com"
5558
56- # Always update activity timestamp - forces a commit
57- echo "Last sync: $(date -u '+%Y-%m-%d %H:%M:%S UTC')" > .github/activity_tracker.txt
59+ # Update activity tracker
60+ echo "$(date -u '+%Y-%m-%d %H:%M:%S UTC')" > .github/activity_tracker.txt
61+
62+ # Remove old keep_active if exists
63+ rm -f .github/.keep_active
5864
59- git add -A
65+ git add .github/activity_tracker.txt .github/stats.json .github/ci_status.md
6066 git commit -m "chore: $(date -u '+%Y-%m-%d %H:%M') sync"
6167 git push
0 commit comments