update-dynamic-csv-data-files #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: update-dynamic-csv-data-files | |
on: | |
schedule: | |
- cron: '0 0 2 * *' # “At 00:00 on day-of-month 2” (on the 2nd of the month) | |
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 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.11' | |
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: Web Scrap for New Changes - swath_coverage_by_time_position.csv | |
working-directory: pydar | |
run: | | |
python updateCsvSwathCoverage.py | |
- name: Web Scrap for New Changes - coradr_jpl_options.csv | |
working-directory: pydar | |
run: | | |
python updateCsvCORADARJPLOptions.py | |
- name: Web Scrap for New Changes - feature_name_details.csv | |
working-directory: pydar | |
run: | | |
python updateCsvFeatureNameDetails.py | |
- name: Check if script results in changes in files | |
uses: tj-actions/verify-changed-files@v17 | |
id: verify-changed-files | |
- name: If file changed, throw error to review changes | |
if: steps.verify-changed-files.outputs.files_changed == 'true' | |
run: | | |
echo "Github Actions: review changes to data files" | |
exit 1 | |
- 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" |