-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (29 loc) · 1016 Bytes
/
manual.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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 user.name 'github-actions[bot]'
git config user.email '[email protected]'
git commit -am "bot: update README.md automatically" || echo "No changes to commit"
git push "https://x-access-token:${{secrets.GODMODE}}@github.com/${{ github.repository }}.git"
- 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."