-
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.72 KB
/
require-changelog.yml
File metadata and controls
63 lines (54 loc) · 1.72 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
63
name: Require Changelog Entry
on:
workflow_call:
inputs:
base-ref:
type: string
required: false
default: main
pull_request:
permissions:
contents: read
jobs:
require-changelog:
name: Require Changelog Update
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
uses: php-actions/composer@v6
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ github.token }}"} }'
COMPOSER_CACHE_DIR: /tmp/composer-cache
with:
php_version: '8.3'
command: 'install'
args: '--prefer-dist --no-progress --no-interaction --no-scripts'
- name: Resolve base reference
id: base_ref
run: echo "value=${INPUT_BASE_REF:-${GITHUB_BASE_REF:-main}}" >> "$GITHUB_OUTPUT"
env:
INPUT_BASE_REF: ${{ inputs.base-ref }}
- name: Fetch base reference
run: git fetch origin "${BASE_REF}" --depth=1
env:
BASE_REF: ${{ steps.base_ref.outputs.value }}
- name: Verify unreleased changelog entries
uses: php-actions/composer@v6
env:
BASE_REF: ${{ steps.base_ref.outputs.value }}
with:
php_version: '8.3'
php_extensions: pcov pcntl
command: 'dev-tools'
args: 'changelog:check -- --against="refs/remotes/origin/${BASE_REF}"'