-
-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (33 loc) · 974 Bytes
/
get-cloudflare.yml
File metadata and controls
37 lines (33 loc) · 974 Bytes
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
name: GET Cloudflare
on:
schedule:
# At 6am every night
- cron: '0 6 * * *'
jobs:
get-data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
- run: npm install
- name: Fetch Cloudflare data
env:
CLOUDFLARE_ZONE_TAG: ${{ secrets.CLOUDFLARE_ZONE_TAG }}
CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }}
CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }}
run: npm run get-cloudflare
- name: check for changes
run: git status
- name: stage changed files
run: |
git config --local user.name "ocf-bot"
git config --local user.email "info@openclimatefix.org"
git add .
git commit -m "🗃 Add latest cloudflare data"
- name: fetch from main
run: git fetch origin main
- name: push code to main
run: git push origin HEAD:main