-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (31 loc) · 871 Bytes
/
fetch.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
32
33
34
35
36
37
38
39
name: Fetch
on:
workflow_dispatch:
schedule:
- cron: '10 18 * * *'
jobs:
fetch:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Set Timezone
run: sudo timedatectl set-timezone "Asia/Shanghai"
- uses: actions/checkout@v4
- name: Load .env file
uses: xom9ikk/dotenv@v2
- name: Fetch
id: fetch
uses: yjl9903/fetch-captain@v1
with:
ruid: ${{ env.RUID }}
roomid: ${{ env.ROOM_ID }}
output: './data/YYYY/MM/DD.csv'
- name: Push
continue-on-error: true
run: |
git add **/*.csv
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git commit -m "update: add ${{ steps.fetch.outputs.csv }}"
git push