-
Notifications
You must be signed in to change notification settings - Fork 69
36 lines (35 loc) · 1.21 KB
/
check-changelog.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
name: Check changelog
on:
pull_request:
branches:
- develop
- 'release/**'
paths-ignore:
- '.github/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-changelog:
name: Check changelog
runs-on: ubuntu-latest
steps:
# clone the repository
- uses: actions/checkout@v4
# enable dependencies caching
- name: Add composer to cache
uses: actions/cache@v4
with:
path: ~/.cache/composer/
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
# setup PHP, but without debug extensions for reasonable performance
- name: "Set up PHP"
uses: ./.github/actions/setup-php
# Install composer packages.
- run: composer self-update && composer install --no-progress
# Fetch the target branch before running the check.
- name: Fetch the target origin branch
run: git fetch origin $GITHUB_BASE_REF
# Check if any changelog file is added when comparing the current branch vs the target branch.
- name: Check changelog
run: bash bin/check-changelog.sh origin/$GITHUB_BASE_REF HEAD