Merge pull request #66 from kafitzgerald/issue65_retries #11
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 Registry | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
update_registry: | |
runs-on: 'ubuntu-20.04' | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: 'main' | |
- name: Install dependencies | |
run: | | |
python -m pip install pip --upgrade | |
python -m pip install pooch | |
- name: Re-Create Registry | |
shell: bash | |
run: python create_registry.py | |
- name: Check for changes | |
id: git-status | |
run: | | |
git status --porcelain > changes.txt | |
if [ ! -s changes.txt ]; then | |
echo "::set-output name=commit_needed::false" | |
else | |
echo "::set-output name=commit_needed::true" | |
fi | |
shell: bash | |
- name: Commit changes | |
if: steps.git-status.outputs.commit_needed == 'true' | |
run: | | |
git config --global user.name '${{ github.actor }}' | |
git config --global user.email '<${{ github.actor }}@users.noreply.github.com>' | |
git add registry.txt | |
git commit --allow-empty -m "Update Registry.txt" | |
git push origin update-registry | |
- name: Create pull request | |
if: steps.git-status.outputs.commit_needed == 'true' | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
branch: update-registry | |
commit-message: Update Registry.txt | |
title: Update Registry.txt | |
body: | | |
This pull request updates the registry.txt file. | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |