Porepy Model Protocol #6
Workflow file for this run
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 protocol docstrings | |
# Run this workflow on every push or pull request to the main branch | |
on: | |
pull_request: | |
branches: | |
- develop | |
permissions: | |
contents: write | |
jobs: | |
run-python-script: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Set up Python | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12.7' | |
# Run the Python script | |
- name: Run Python script | |
run: python build_tools/protocol_docstrings_script.py | |
# Configure Git to commit and push the changes | |
- name: Set up Git user info | |
run: | | |
git config --global user.name 'GitHub Action' | |
git config --global user.email '[email protected]' | |
# Check if there are any changes and commit them | |
- name: Commit and push changes | |
run: | | |
touch test.txt | |
git add . | |
git commit -m "Update files via Python script" || echo "No changes to commit" | |
git push origin HEAD:${{ github.ref }} |