Skip to content

December updates 2025 #140

December updates 2025

December updates 2025 #140

# Format follows example here:
# https://canovasjm.netlify.app/2020/11/29/github-actions-run-a-python-script-on-schedule-and-commit-changes/
name: update-website-csv
on:
pull_request:
branches:
- main
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
# checkout repo contents
- name: checkout repo content
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
# install python
- name: setup python
uses: actions/setup-python@v2
with:
python-version: '3.x'
# install python packages
- name: install python packages
run: |
python -m pip install --upgrade pip
pip install -r ./csv/converters/requirements.txt
# Run script.py to update website.csv
- name: execute py script
run: python ./csv/converters/script.py
# Commit updated csv files
- name: commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -A
git commit -m "update website.csv" -a
# Push changes to repo
- name: push changes
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.event.pull_request.head.ref }}