Skip to content

Update CSV-files

Update CSV-files #13

Workflow file for this run

name: Update CSV-files
on:
schedule:
# Run weekly. Random numbers are used to avoid high load times and in turn being dropped.
- cron: "40 12 * * 5"
workflow_dispatch:
jobs:
update-csv:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Update the CSV-files
run: python update.py
shell: bash
- uses: stefanzweifel/git-auto-commit-action@v5
id: auto-commit-action
with:
commit_message: Auto-update
file_pattern: '*.csv'
- name: "Run if changes have been detected"
if: steps.auto-commit-action.outputs.changes_detected == 'true'
run: echo "The data was changed!"
- name: "Run if no changes have been detected"
if: steps.auto-commit-action.outputs.changes_detected == 'false'
run: echo "No changes in the data!"