Skip to content

Commit

Permalink
Create manual.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Coding4Hours authored Jul 8, 2024
1 parent 7985ba9 commit e2b689d
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Tic-Tac-Toe Game

on:
issues:
types: [opened]

jobs:
process_move:
runs-on: ubuntu-latest
if: startsWith(github.event.issue.title, 'move')
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Process move
run: |
move=$(echo ${{ github.event.issue.title }} | sed 's/move //')
python tic_tac_toe.py $move
- name: Commit and push if changed
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git add README.md
git diff --quiet && git diff --staged --quiet || (git commit -m "Update game board"; git push)
- name: Close issue
uses: peter-evans/close-issue@v2
with:
issue-number: ${{ github.event.issue.number }}
comment: "Move processed. Check the README for the updated game board."

0 comments on commit e2b689d

Please sign in to comment.