-
Notifications
You must be signed in to change notification settings - Fork 5k
Expand file tree
/
Copy pathpreview-api-version-linter.yaml
More file actions
36 lines (33 loc) · 1.18 KB
/
preview-api-version-linter.yaml
File metadata and controls
36 lines (33 loc) · 1.18 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
---
name: Preview ARM API Version Linter
permissions:
contents: read
pull-requests: write
on:
pull_request:
types: ["opened", "synchronize"]
paths:
- ".github/workflows/preview-api-version-linter.yaml"
- "internal/tools/preview-api-version-linter/**"
- "vendor/**"
jobs:
preview-api-version-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version-file: ./.go-version
- run: go run internal/tools/preview-api-version-linter/main.go
- name: Guidance on failure
if: failure()
run: |
echo "::error::Preview API Version Linter failed."
echo ""
echo "Your changes reference Azure ARM API versions that are in preview."
echo "Preview API versions should not be used unless explicitly required and approved."
echo "Please update the API version references to use GA (stable) versions."
comment-on-fail:
needs: preview-api-version-linter
if: ${{ failure() }}
uses: ./.github/workflows/comment-failure.yaml