forked from Luminara-Hub/namada-ecosystem
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.4 KB
/
run-interfaces-check.yml
File metadata and controls
51 lines (41 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Run Interface Status Check
permissions:
contents: write
on:
schedule:
- cron: "*/30 * * * *" # Every 30 minutes
workflow_dispatch: # Allow manual trigger
jobs:
check-interfaces:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install beautifulsoup4 aiohttp
- name: Run Interface Check Script
run: python _luminara-homebase/scripts/interfaces_check.py
- name: Commit & Push interface-status.json
run: |
git config user.name "GitHub Action"
git config user.email "action@github.com"
git stash || echo "ℹ️ Nothing to stash"
git pull --rebase origin main
git stash pop || echo "ℹ️ Nothing to pop"
if [ -f "_luminara-homebase/interface-status.json" ]; then
git add -f _luminara-homebase/interface-status.json
if git diff --cached --quiet; then
echo "✅ No changes to commit"
else
git commit -m "Update interface-status.json"
git push
fi
else
echo "⚠️ File not generated – nothing to commit"
fi