Check Games List.json #18
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: Check Games List.json | |
on: | |
schedule: | |
- cron: '0 0 * * 0' | |
workflow_dispatch: | |
jobs: | |
check-links: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests pillow | |
- name: Run script | |
run: | | |
python scripts/games-list-autocreate.py link_status.md | |
- name: Update README with status | |
run: | | |
sed -i '/## Games List.json Status/,$d' README.md README.md | |
echo -e "## Games List.json Status\n\n$(cat link_status.md)" >> README.md | |
echo -e "\n### Symbols:\n✔: Icon is working.\n\n❓: Icon is either low-res or not a square.\n\n❌: Icon is not working." >> README.md | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git add README.md | |
git diff --cached --quiet || git commit -m "Update README with game cover link status" | |
git push | |