-
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.11 KB
/
Chess.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
35
36
37
38
39
40
41
name: Chess
on:
issues:
types: [opened]
jobs:
move:
runs-on: ubuntu-latest
if: startsWith(github.event.issue.title, 'Chess:')
steps:
- name: Setting up environment
run: |
echo ISSUE_NUMBER="${{ github.event.issue.number }}" >> $GITHUB_ENV
echo GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
echo REPOSITORY_OWNER="${{ github.repository_owner }}" >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: Setting up Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
architecture: "x64"
- name: Play chess
run: |
pip install -r requirements.txt
python main.py
- name: Commit and push changes
env:
ISSUE_TITLE: ${{ github.event.issue.title }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git pull
git add .
git commit -m "${ISSUE_TITLE} by ${{ github.event.issue.user.login }}"
git push