-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 972 Bytes
/
integrate.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
name: Integrate
on:
issue_comment:
types: [ created ]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.issue.pull_request.url }}
jobs:
integrate:
name: Integrate
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/integrate')
runs-on: ubuntu-latest
steps:
- name: Clone Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout Pull Request
run: |
PR_NUM=${PR_URL##*/}
gh pr checkout $PR_NUM
- uses: ruby/setup-ruby@master
- name: Install gems
run: bundle install
- name: Install dependencies
run: bundle exec appraisal install
- name: Run Rubocop
run: bundle exec appraisal rake rubocop
- name: Run Specs
run: bundle exec appraisal rake spec
- name: Merge PR
run: |
PR_NUM=${PR_URL##*/}
gh pr merge $PR_NUM