This repository has been archived by the owner on Nov 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
66 lines (57 loc) · 1.63 KB
/
traefik-hub.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
60
61
62
63
64
65
66
name: Traefik Hub Static Analyzer
on:
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
permissions:
checks: write
contents: write
steps:
- uses: actions/checkout@v4
- name: Lint Traefik Hub CRDs with hub-static-analyzer
uses: traefik/hub-static-analyzer-action@main
with:
exclude: "apps/overlays/local/*"
token: ${{ secrets.GH_TOKEN }}
lint: true
lint-format: checkstyle
lint-output-file: ./output.xml
- name: Annotate code
if: ${{ !cancelled() }}
uses: Juuxel/publish-checkstyle-report@v1
with:
reports: |
./output.xml
diff:
runs-on: ubuntu-latest
permissions:
checks: write
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Lint Traefik Hub CRDs with hub-static-analyzer
uses: traefik/hub-static-analyzer-action@main
with:
token: ${{ secrets.GH_TOKEN }}
diff: true
diff-range: "origin/${GITHUB_BASE_REF}...origin/${GITHUB_HEAD_REF}"
diff-output-file: ./output.md
- name: Prepare report
shell: bash
run: |
set -u
echo "# Traefik Hub Report:" > header.md
echo "" >> header.md
echo "The following changes have been detected." >> header.md
echo "" >> header.md
- name: Write report
if: ${{ hashFiles('./output.md') != ''}}
uses: mshick/add-pr-comment@v2
with:
message-path: |
header.md
output.md