-
Notifications
You must be signed in to change notification settings - Fork 1.8k
42 lines (39 loc) · 1.41 KB
/
changelog.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
# This changelog ensures that PR bodies include a `changelog: <changelog entry>` section,
# or a `no-changelog` label set. If they do not, then a comment will be added to the PR
# asking the developer to add one of the two.
name: Validate changelog entry
on:
pull_request:
types:
- edited
- labeled
- opened
- ready_for_review
- reopened
- synchronize
- unlabeled
permissions:
pull-requests: write
concurrency:
cancel-in-progress: true
# This value is arbitrary as long as it includes the pull request number
group: 'limit to running one instance at a time for the pull request ${{ github.event.pull_request.number }}'
jobs:
validate-changelog:
name: Validate the changelog entry
if: ${{ !startsWith(github.head_ref, 'dependabot/') && !github.event.pull_request.draft }}
runs-on: ubuntu-latest
steps:
# Checkout main branch of shared-workflow repository.
- name: Checkout shared-workflow
uses: actions/checkout@v4
with:
repository: gravitational/shared-workflows
path: .github/shared-workflows
ref: main
- name: Installing Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Validate the changelog entry
run: cd .github/shared-workflows/bot && go run main.go -workflow=changelog -token="${{ secrets.GITHUB_TOKEN }}" -reviewers="${{ secrets.reviewers }}"