Skip to content
# # This workflow would make sure that there are some changes on CHANGELOG.md or
# # the label "no-need-update-changelog" is tagged on the PR.
# name: "Must Update CHANGELOG"
# on:
# pull_request:
# types:
# - opened
# - synchronize
# - reopened
# - labeled
# - unlabeled
# branches:
# - master
# - release-*
# permissions: read-all
# jobs:
# must-update-changelog:
# name: "Must Update CHANGELOG"
# runs-on: "ubuntu-20.04"
# env:
# LABEL_EXISTS: ${{ contains(github.event.pull_request.labels.*.name, 'no-need-update-changelog') }}
# steps:
# - name: "Skip if label exists"
# id: "skip-if-label-exists"
# run: |
# if [ "${LABEL_EXISTS}" = "true" ] ; then
# echo "no-need-update-changelog exists, skipping this check"
# exit 0
# fi
# - name: "Collect changes"
# id: "collect-changes"
# if: ${{ ! fromJSON(env.LABEL_EXISTS) }}
# uses: dorny/paths-filter@v2
# with:
# filters: |
# changelog:
# - CHANGELOG.md
# - name: "Make sure CHANGELOG.md is updated"
# id: "check-changelog"
# if: ${{ ! fromJSON(env.LABEL_EXISTS) }}
# env:
# CHANGELOG_UPDATED: ${{ steps.collect-changes.outputs.changelog }}
# run: |
# if [ "${CHANGELOG_UPDATED}" = "true" ] ; then
# echo "CHANGELOG.md is updated"
# else
# echo "CHANGELOG.md is not updated"
# exit 1
# fi