-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (47 loc) · 1.67 KB
/
web_scrap_dynamic_csv_files.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: update-dynamic-csv-data-files
on:
schedule:
- cron: '0 0 1 * *' # “At 00:00 on day-of-month 1”
jobs:
build:
runs-on: ubuntu-20.04 # specifically calls the version number instead of lastest to work on 'act'
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: '3.9'
architecture: 'x64'
env:
AGENT_TOOLSDIRECTORY: /opt/hostedtoolcache
- name: pip install requirements
run: |
export SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True
pip install --upgrade pip
pip install -r requirements.txt
pip install pydar
- name: Set Github credentials
run: |
git config user.name "GitHub Action"
git config user.email "[email protected]"
git pull
- name: Web Scrap for New Changes
working-directory: pydar
run: |
python updateCsvSwathCoverage.py
python updateCsvCORADARJPLOptions.py
python updateCsvFeatureNameDetails.py
- name: Check if script results in changes in files
uses: tj-actions/verify-changed-files@v13
id: verify-changed-files
- name: If file changed, commit and push if files
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git add -A
timestamp=$(date -u)
git commit -m "Github Actions: update csv scripts (${timestamp})"
git push
- name: If file not changed, do not commit empty changes
if: steps.verify-changed-files.outputs.files_changed == 'false'
run: |
echo "Github Actions: update csv scripts has no changes"