From c6c039d37dcbb936624b53ecde354e097f972375 Mon Sep 17 00:00:00 2001 From: bgreman <47828384+bgreman@users.noreply.github.com> Date: Mon, 28 Jun 2021 15:56:06 -0400 Subject: [PATCH] Verify changelog change on PR --- .github/workflows/verify_changelog_change.yml | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/verify_changelog_change.yml diff --git a/.github/workflows/verify_changelog_change.yml b/.github/workflows/verify_changelog_change.yml new file mode 100644 index 00000000..d80e70ea --- /dev/null +++ b/.github/workflows/verify_changelog_change.yml @@ -0,0 +1,32 @@ +name: Verify Changelog.md update + +# Controls when the workflow will run +on: + # Triggers the workflow on pull request events but only for the develop branch + pull_request: + branches: [ develop ] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "confirm" + confirm-changelog-update: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + name: Verify that the PR contains an update to changelog.md + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v8.4 + with: + files: | + changelog.md + + - name: Fail if no change to changelog.md + if: steps.changed-files.outputs.any_changed != 'true' + run: exit 1