Skip to content

update-dynamic-csv-data-files #19

update-dynamic-csv-data-files

update-dynamic-csv-data-files #19

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 -r requirements.txt
pip install pydar
- name: Set Github credentials
run: |
git config user.name "GitHub Action"
git config user.email "actions@users.noreply.github.com"
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"