Skip to content

Commit 7fa7180

Browse files
Add workflow to collect module metrics every 15 minutes (#33)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 8ea2f9f commit 7fa7180

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Collect Metrics
2+
3+
on:
4+
schedule:
5+
- cron: '*/15 * * * *' # Every 15 minutes
6+
workflow_dispatch: # Allows manual trigger from GitHub UI
7+
8+
jobs:
9+
collect-metrics:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Trigger Zuplo metrics collection
13+
env:
14+
ZUPLO_API_BASE_URL: ${{ vars.ZUPLO_API_BASE_URL }}
15+
run: |
16+
curl --silent --show-error -f -X GET \
17+
-H "Authorization: Bearer ${{ secrets.ZUPLO_COLLECTOR_API_KEY }}" \
18+
$ZUPLO_API_BASE_URL/metrics/experimental/asimov-modules
19+
20+
- name: Check if succeeded
21+
if: success()
22+
run: echo "✅ Metrics collected successfully"
23+
24+
- name: Alert on failure
25+
if: failure()
26+
run: echo "❌ Failed to collect metrics"

0 commit comments

Comments
 (0)