-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 996 Bytes
/
update-data.yaml
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
name: Data_Auto_Update_Tool
env:
S3_KEY_ID: ${{ secrets.S3_KEY_ID }}
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }}
S3_OUTPUT_FOLDER: ${{ secrets.S3_OUTPUT_FOLDER || '' }}
on:
schedule:
- cron: "30 23 * * *"
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
- run: |
pip install -r requirements.txt
- name: Data generating script
run: |
python main.py
- name: Upload data to S3
uses: Itheum/upload-s3-action@master
id: S3
with:
aws_key_id: ${{ env.S3_KEY_ID }}
aws_secret_access_key: ${{ env.S3_ACCESS_KEY }}
aws_bucket: ${{ env.S3_BUCKET_NAME }}
source_dir: output
destination_dir: ${{ env.S3_OUTPUT_FOLDER }}