Chess: Move E3 to G3 #5451
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: Chess | |
on: | |
issues: | |
types: [opened] | |
jobs: | |
move: | |
name: Play Chess | |
runs-on: ubuntu-latest | |
if: startsWith(github.event.issue.title, 'Chess:') | |
steps: | |
- uses: actions/checkout@v3 | |
# Set up a Python 3.10 (64-bit) instance | |
- name: Setting up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
architecture: "x64" | |
# Use pip to install the dependencies and then run the script | |
- name: Play chess | |
env: | |
ISSUE_NUMBER: ${{ github.event.issue.number }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REPOSITORY_OWNER: ${{ github.repository_owner }} | |
run: | | |
pip install -r requirements.txt | |
python main.py | |
# Create new commit with the changed files and push it to GitHub | |
- name: Commit and push changes | |
env: | |
ISSUE_TITLE: ${{ github.event.issue.title }} | |
ISSUE_AUTHOR: ${{ github.event.issue.user.login }} | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit -m "${ISSUE_TITLE} by ${ISSUE_AUTHOR}" | |
git push | |
- name: Install stockfish | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y stockfish | |
echo STOCKFISH_PATH="$(which stockfish)" >> $GITHUB_ENV | |
- name: Run webhook | |
env: | |
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} | |
run: | | |
pip install -r requirements-webhook.txt | |
python webhook.py |