-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.46 KB
/
po-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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Prometheus Operator Linter
on:
pull_request:
paths:
- kubectl_deploy/*prometheus.yaml
- kubectl_deploy/*prometheus.yml
- kubectl_deploy/*/*prometheus.yaml
- kubectl_deploy/*/*prometheus.yml
workflow_dispatch:
jobs:
po-lint:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run po-linter
uses: docker://ministryofjustice/cloud-platform-po-linter:latest
continue-on-error: true
id: po-linter
env:
GITHUB_OAUTH_TOKEN: ${{ secrets.ACTION_TOKEN }}
REPO_DIRECTORY: kubectl_deploy
- name: Result
uses: actions/github-script@v7
env:
summary: "Result:\n${{ steps.po-linter.outputs.po-linter }}"
with:
github-token: ${{ secrets.ACTION_TOKEN }}
script: |
const output = `#### Prometheus Operator Linting Results \`${{ steps.po-linter.outcome }}\`
<details><summary>Show</summary>
${process.env.summary}
</details>`
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})
- name: Exitcode
if: steps.po-linter.outcome != 'success'
run: exit 1