CLOUDP-295785 - GitHub Actions workflow that checks for changelogs #22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Validate Changelog Requirement | |
on: | |
pull_request: | |
branches: | |
- master | |
- release-* | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- labeled | |
- unlabeled | |
jobs: | |
validate-changelog: | |
name: Check for valid changelog entry | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: Setup host | |
uses: ./.github/actions/setup-ubuntu-host | |
with: | |
python-version: '${{ vars.PYTHON_VERSION }}' | |
- name: Check if changelog entry file was added in this PR | |
run: | | |
python -m scripts.release.check_changelog -b $BASE_SHA -f $FAIL_ON_NO_CHANGES | tee >> $GITHUB_STEP_SUMMARY | |
env: | |
BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
FAIL_ON_NO_CHANGES: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-changelog') }} |