debugging workflow #6
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 views_pipeline on Changes in cm_querysets.py and pgm_querysets.py | |
# Trigger on file changes in viewsforecasting | |
on: | |
push: | |
branches: | |
- main | |
- github_workflows | |
paths: | |
- Tools/cm_querysets.py | |
- Tools/pgm_querysets.py | |
workflow_dispatch: | |
jobs: | |
modify-views_pipeline: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Echo Step 1 - Starting Workflow | |
run: echo "Starting workflow to update views_pipeline..." | |
- name: Checkout viewsforecasting repository | |
run: echo "Checking out viewsforecasting repository..." | |
uses: actions/checkout@v3 | |
with: | |
repository: prio-data/viewsforecasting | |
token: ${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }} | |
- name: Echo Step 2 - Cloning views_pipeline repository | |
run: echo "Cloning views_pipeline repository..." | |
- name: Clone views_pipeline repository | |
run: | | |
git clone https://github.com/prio-data/views_pipeline.git | |
cd views_pipeline | |
git checkout create_cm_catalog_01 | |
continue-on-error: false | |
- name: Echo Step 3 - Running generate_links_to_querysets.py | |
run: echo "Running generate_links_to_querysets.py..." | |
- name: Run Python script | |
run: | | |
cd views_pipeline | |
python documentation/catalogs/generate_links_to_querysets.py | |
continue-on-error: false | |
- name: Echo Step 4 - Committing changes | |
run: echo "Committing and pushing changes..." | |
- name: Commit and Push Changes | |
run: | | |
cd views_pipeline | |
git add documentation/catalogs/cm_model_catalog.md | |
git commit -m "Automated changes by GitHub Actions" | |
git push origin create_cm_catalog_01 | |
env: | |
GITHUB_TOKEN: ${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }} | |
- name: Echo Step 5 - Workflow completed | |
run: echo "Workflow completed successfully!" | |