Skip to content

Refresh Misc

Refresh Misc #991

Workflow file for this run

name: Refresh Misc
on:
schedule:
# At 23:55.
- cron: "55 23 * * *"
workflow_dispatch:
jobs:
refresh_misc:
runs-on: ubuntu-latest
steps:
# Clones the repo
- name: Checkout Repo Content
uses: actions/checkout@v4
# Clones the data repo
- name: Clone Data Repo
uses: actions/checkout@v4
with:
repository: itu-helper/data
token: ${{ secrets.API_TOKEN_GITHUB }}
path: ./data/
# Go Back to the main repo
- name: Back to Main Repo
run: |
cd ..
# Sets up python
- name: Python Setup
uses: actions/[email protected]
with:
python-version: 3.11
# Install the python requirements via pip
- name: Install Python Requirements
run: pip install -r requirements.txt
# Run the python script
- name: Python Run
run: |
python src/run.py -scrap_target misc
# Commits the changes back to the data repo
- name: Push building_codes.psv to itu-helper/data
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: './data/building_codes.psv'
destination_repo: 'itu-helper/data'
user_email: '[email protected]'
user_name: 'ITU Helper'
# Commits the changes back to the data repo
- name: Push programme_codes.psv to itu-helper/data
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: './data/programme_codes.psv'
destination_repo: 'itu-helper/data'
user_email: '[email protected]'
user_name: 'ITU Helper'