-
Notifications
You must be signed in to change notification settings - Fork 84
32 lines (31 loc) · 1005 Bytes
/
pre-commit.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
name: pre-commit
on:
pull_request:
push:
branches:
- main*
jobs:
pre-commit:
runs-on: charon-ci
env:
SKIP: golangci-lint,run-go-tests,no-commit-to-branch
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Disable shallow checkout
- uses: actions/setup-python@v2
- uses: ./.github/actions/setup-go
- uses: pre-commit/action@v2.0.3
- 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/action-discord@0.3.2