Update README.md #103
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: Build emails.json file from README | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
jobs: | |
update: | |
name: Update the emails.json file | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
architecture: 'x64' | |
- name: convert README to json | |
run: | | |
python convert_readme.py | |
- name: setup git config | |
run: | | |
git config user.name "Quincy Larson Emails Bot" | |
git config user.email "<>" | |
echo ::set-output name=is_changed::$(git status --porcelain) | |
- name: commit changes | |
run: | | |
if git status --porcelain | grep 'emails.json'; then | |
echo "Commiting changed emails.json file" | |
git add emails.json | |
git commit -m "update emails.json" | |
git push origin main | |
else | |
echo "No changes to be commited" | |
fi |