-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (57 loc) · 1.96 KB
/
Copy pathmain.yml
File metadata and controls
57 lines (57 loc) · 1.96 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: allData.csv is updated
on:
# workflow_dispatch:
push:
branches:
- main
- dev
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: checkout repo content
uses: actions/checkout@v3 # checkout the repository content
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10' # install the python version needed
- name: Download file X from Google Drive to default (./) directory
uses: k0staa/download-gdrive-file-action@v1
with:
service-account-key-json: ${{ secrets.CREDENTIAL_JSON }}
download-file-name: allData.csv
- name: install python packages
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: execute py script # run main.py
run: |
rm ./vizualization/final/*.png || true
python process_data.py
python weekly.py
git config user.name github-actions
git config user.email github-actions@github.com
echo "Executing bash script containing imagemagick commands."
./montage.sh
echo "completed at: $(date)" >> action_message
git add action_message
git add ./vizualization/final/
git commit -m "auto generated by github action: completed at: $(date)"
git push
echo "Done"
- name: upload to gdrive
uses: adityak74/google-drive-upload-git-action@main
with:
credentials: ${{ secrets.credentials }}
filename: "allData.csv"
folderID: ${{ secrets.folderId }}
overwrite: "true"
- name: upload to gdrive
uses: adityak74/google-drive-upload-git-action@main
with:
credentials: ${{ secrets.credentials }}
filename: "./vizualization/final/montage.png"
folderID: ${{ secrets.folderId }}
overwrite: "true"