Update Course Data #465
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 Course Data | |
on: | |
schedule: | |
- cron: '0 2 * * *' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
update-data: | |
# Adapted from https://github.com/StoDevX/AAO-React-Native/blob/master/.github/workflows/cocoapods.yml | |
name: Course Data Update | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
python-version: ["3.7"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.COURSE_DATA_TOOLS_GH_PUSH_TOKEN }} | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: push-on-course-data-change | |
run: bash bin/github.sh | |
env: | |
GITHUB_BRANCH: ${{ github.ref_name }} | |
head_ref: ${{ github.ref }} | |
GITHUB_OAUTH: ${{ secrets.COURSE_DATA_TOOLS_GH_PUSH_TOKEN }} |