Skip to content

Memory flip game

Memory flip game #43

Workflow file for this run

name: Update Game Index
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
update-index:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # Important for pushing commits back
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Update INDEX.md
run: |
python update_index.py
- name: Commit and push changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add INDEX.md
if [[ -n "$(git status --porcelain INDEX.md)" ]]; then
git commit -m "Auto-update INDEX.md with new games [skip ci]"
git push origin HEAD:${GITHUB_REF#refs/heads/}
else
echo "No changes to INDEX.md"
fi