-
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.06 KB
/
connect4.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
42
43
name: "Connect4"
on:
workflow_dispatch:
issues:
types: [opened]
jobs:
move:
runs-on: ubuntu-latest
if: startsWith(github.event.issue.title, 'connect4|')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
- name: Setup Gems
run: |
gem install octokit -N --silent
- name: Play
env:
REPOSITORY: ${{ github.repository }}
EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }}
EVENT_ISSUE_TITLE: ${{ github.event.issue.title }}
EVENT_USER_LOGIN: ${{ github.event.issue.user.login }}
run: |
ruby <<- EORUBY
require './connect4/runner'
Connect4::Runner.new(
github_token: '${{ secrets.GITHUB_TOKEN }}',
issue_number: ENV.fetch('EVENT_ISSUE_NUMBER'),
issue_title: ENV.fetch('EVENT_ISSUE_TITLE'),
repository: ENV.fetch('REPOSITORY'),
user: ENV.fetch('EVENT_USER_LOGIN'),
).run
EORUBY