-
Notifications
You must be signed in to change notification settings - Fork 4
38 lines (35 loc) · 1.13 KB
/
tests.yaml
File metadata and controls
38 lines (35 loc) · 1.13 KB
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
name: Tests
on:
pull_request:
branches:
- main
jobs:
test:
name: Tests Succeeded
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- run: make test
auto-merge:
name: Automatically merge bot PRs
needs: test
runs-on: ubuntu-latest
steps:
- name: Create token
if: (github.actor == 'dependabot[bot]' || github.actor == 'crd-automation[bot]') && github.event_name == 'pull_request'
id: app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.AUTOMATION_APP_ID }}
private-key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: catalog
- name: Merge PR
if: (github.actor == 'dependabot[bot]' || github.actor == 'crd-automation[bot]') && github.event_name == 'pull_request'
run: gh pr merge --admin --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ steps.app-token.outputs.token }}