-
Notifications
You must be signed in to change notification settings - Fork 27
38 lines (31 loc) · 1.13 KB
/
update_readme.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# 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@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
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