Merge pull request #181 from naylor-b/poem87 #115
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
# This workflow updates the table of OpenMDAO POEMs in the README.md with each push | |
name: Update README | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ master ] | |
# workflow_dispatch allows to run your workflow manually | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Run script | |
run: python ./.github/scripts/update_readme.py | |
# Our script updated README.md, but we need to commit all changes | |
- name: Commit and push if changed | |
run: | | |
git add . | |
git diff | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Action" | |
git commit -m "Updated README" -a || echo "No changes to commit" | |
git push |