-
Notifications
You must be signed in to change notification settings - Fork 88
37 lines (35 loc) · 1.08 KB
/
golangci-lint.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: golangci-lint
on:
pull_request:
push:
branches:
- main*
permissions:
contents: read
pull-requests: read
jobs:
golangci:
runs-on: ubuntu-latest
steps:
# Config options can be found in README here: https://github.com/golangci/golangci-lint-action
- uses: actions/setup-go@v4
with:
go-version: '1.20.6'
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
- name: notify failure
if: failure() && github.ref == 'refs/heads/main'
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_USERNAME: GitHub
DISCORD_AVATAR: https://avatars.githubusercontent.com/u/583231
DISCORD_EMBEDS: |
[{
"title": "🚨 Main branch workflow failed: ${{ github.workflow }}",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"color": 10038562
}]
uses: Ilshidur/[email protected]