-
Notifications
You must be signed in to change notification settings - Fork 387
95 lines (95 loc) · 3.21 KB
/
master.yaml
File metadata and controls
95 lines (95 loc) · 3.21 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: master
on:
push:
branches:
- master
permissions: {}
env:
TESTCONTAINERS_RYUK_DISABLED: true
jobs:
tests:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5
with:
# https://www.npmjs.com/package/semver#caret-ranges-123-025-004
go-version: "^1.23"
check-latest: true
- run: go version
- run: make deps
- run: make check-fmt
- run: make vet
- run: make staticcheck
- run: make osv-scanner
- run: make govulncheck
- run: make check-race
- run: make capslock
- run: make coverprofile
- name: Convert coverage to lcov
uses: jandelgado/gcov2lcov-action@e4612787670fc5b5f49026b8c29c5569921de1db
- name: Coveralls
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov
alert-on-failure:
runs-on: ubuntu-latest
needs: [tests]
if: ${{ failure() }}
steps:
- id: failed-name
env:
GH_TOKEN: ${{ github.token }}
run: echo NAME=$(gh api /repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/jobs | jq -r '.jobs[0].steps[]|select(.conclusion == "failure")|.name') >> "$GITHUB_OUTPUT"
- id: job-id
env:
GH_TOKEN: ${{ github.token }}
run: echo ID=$(gh api /repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/jobs | jq -r '.jobs[0].id') >> "$GITHUB_OUTPUT"
- id: thread-key
run: echo KEY=$(date +"%d-%m-%y") >> "$GITHUB_OUTPUT"
- run: >-
curl
-H 'content-type:application/json'
"${{ secrets.INTERNAL_CHAT_WEBHOOK }}"
-d "{
\"thread\": {
\"threadKey\": \"${{ steps.thread-key.outputs.KEY }}\"
},
\"cardsV2\": [
{
\"cardId\": \"skipper-failing-pipeline\",
\"card\": {
\"header\": {
\"title\": \"Build Failed\",
\"imageUrl\": \"https://raw.githubusercontent.com/zalando/skipper/master/img/skipper-h180.png\",
\"imageType\": \"CIRCLE\"
},
\"sections\": [
{
\"header\": \"Failed Step: ${{ steps.failed-name.outputs.NAME }}\",
\"collapsible\": false,
\"widgets\": [
{
\"buttonList\": {
\"buttons\": [
{
\"text\": \"View Build Logs\",
\"onClick\": {
\"openLink\": {
\"url\": \"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/job/${{ steps.job-id.outputs.ID}}\"
}
}
}
]
}
}
]
}
]
}
}
]
}"