.github/workflows/handle_updates.yml #42
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
on: | |
workflow_dispatch: | |
schedule: | |
# Run this every Sunday at 7:15 | |
- cron: '15 7 * * 0' | |
jobs: | |
check_for_updated_schema: | |
runs-on: ubuntu-latest | |
steps: | |
# Check out and set up redox_lib_gen | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: redox_lib_gen | |
- name: Install Python and Poetry | |
uses: ITProKyle/action-setup-python@v0.3.0 | |
with: | |
python-version: "3.10" # String keeps this from being interpreted as a float | |
- name: Set up poetry virtualenv | |
run: | | |
cd redox_lib_gen | |
poetry install | |
# Check out and set up pyredox | |
- name: Checkout pyredox | |
uses: actions/checkout@v3 | |
with: | |
repository: cedar-team/pyredox | |
ref: main | |
path: pyredox | |
- name: Install Python and Poetry | |
uses: ITProKyle/action-setup-python@v0.3.0 | |
with: | |
python-version: 3.7 | |
- name: Set up poetry virtualenv | |
run: | | |
cd pyredox | |
poetry install | |
# Run generator, handle updates | |
- name: Generate fresh version of library | |
run: | | |
cd redox_lib_gen/redox_lib_gen | |
poetry run python generate.py --force-download | |
- name: Open PR if there are changes | |
run: | | |
cd redox_lib_gen/redox_lib_gen | |
poetry run python pull_request.py | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.PYREDOX_GITHUB_TOKEN }} |