Repository navigation
62 lines (51 loc) · 1.75 KB
/
Copy pathchangelog.yaml
File metadata and controls
62 lines (51 loc) · 1.75 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
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
# Changelog
#
# Validates that a changelog entry was added.
# Runs on PRs when:
# - opened/re-opened
# - new commits pushed
# - label is added or removed
# Runs on merge queues, but just passes, because it is a required check.
name: Changelog
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
# Required by GitHub merge queue due to branch protection rules. Should always be successful
merge_group:
types: [checks_requested]
permissions:
contents: read
jobs:
validate-changelog:
permissions:
contents: read
pull-requests: none
runs-on: ubuntu-24.04
env:
NO_CHANGELOG: ${{ contains(github.event.pull_request.labels.*.name, 'no-changelog') }}
SHOULD_RUN: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog') && github.event_name != 'merge_group' }}
steps:
- name: Bypass when no‑changelog label is present
if: env.NO_CHANGELOG == 'true'
run: |
echo "'no-changelog' label detected – skipping changelog validation."
exit 0
- name: Merge queue
if: ${{ github.event_name == 'merge_group' }}
run: |
echo "merge_group event – passing without running changelog validation."
exit 0
# Checkout PR branch (includes changelog.d/ and vdev sources)
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
if: env.SHOULD_RUN == 'true'
with:
fetch-depth: 0
- uses: ./.github/actions/setup
if: env.SHOULD_RUN == 'true'
with:
vdev: true
mold: false
cargo-cache: false
- name: Run changelog fragment checker
if: env.SHOULD_RUN == 'true'
run: vdev check changelog-fragments