-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (50 loc) · 1.32 KB
/
pr.yaml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Pull Request
on:
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
build:
runs-on: elisa-normal
timeout-minutes: 15
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: elisa-actions/setup-go-and-mage@v1
- name: Run lint
run: mage go:lint
- name: Run test
run: mage go:unitTest
- name: Upload test coverage to codecov
uses: elisa-actions/codecov-action@v4-elisa
with:
url: https://codecov.csf.elisa.fi
- name: Build packages
run: mage go:crossBuild
- name: Notify failure
if: |
github.event.pull_request.draft == false &&
failure()
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
MATTERMOST_TEXT: "${{ github.repository }} PR build. Please check [here](${{ github.event.pull_request.html_url }}/checks)."
run: send-to-mattermost
automerge:
needs: [build]
permissions:
pull-requests: write
contents: write
runs-on: elisa-normal
timeout-minutes: 15
steps:
- name: Automerge dependabot PR
uses: elisa-actions/github-action-merge-dependabot@v3
with:
target: minor
github-token: ${{ secrets.DOPS_SRE_PAT }}