-
Notifications
You must be signed in to change notification settings - Fork 10
41 lines (38 loc) · 1.12 KB
/
test-pull-request.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: Test Pull Request
on:
pull_request:
branches:
- main
jobs:
integration:
name: Integration Tests
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.14
- name: Checkout
uses: actions/checkout@v2
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
- name: Run Integration Tests
run: ./scripts/integration.sh
approve:
name: Auto Approve
runs-on: ubuntu-latest
needs: integration
steps:
- name: Parse Author and Number
id: event
run: |
echo "::set-output name=author::$(jq -r .pull_request.user.login ${{ github.event_path }})"
echo "::set-output name=number::$(jq -r .number ${{ github.event_path }})"
- name: Checkout
uses: actions/checkout@v2
- name: Approve
uses: paketo-buildpacks/github-config/actions/pull-request/approve@main
with:
user: paketo-bot-reviewer
token: ${{ secrets.PAKETO_BOT_REVIEWER_GITHUB_TOKEN }}
author: ${{ steps.event.outputs.author }}
number: ${{ steps.event.outputs.number }}