-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (30 loc) · 992 Bytes
/
scrape.yml
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
---
name: Fetch latest Netlify outages data
on:
push:
workflow_dispatch:
schedule:
- cron: "1,16,31,46 * * * *"
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Fetches repo
uses: actions/checkout@v2
- name: Get and format api
run: |-
curl https://www.netlifystatus.com/api/v2/status.json | jq . > netlify_outages.json
- name: Get and format api
run: |-
curl https://www.netlifystatus.com/api/v2/day.json | jq . > netlify_day.json
- name: Get and format api
run: |-
curl https://www.netlifystatus.com/api/v2/summary.json | jq . > netlify_summary.json
- name: Add results to repo
run: |-
git config user.name "Outages Project Worker"
git config user.email "[email protected]"
git add -A *.json
timestamp=$(date -u -Is)
git commit -m "Update outages data on ${timestamp}" || exit 0
git push