Create snake_animation.py #2
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: Greedy Snake Animation | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: pip install asciimatics | |
- name: Run Snake Animation | |
run: | | |
python snake_animation.py > README.md | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add README.md | |
git commit -m "Update README with snake animation" || echo "No changes to commit" | |
git push |