From 93ae3f0b19c49322060a6b5393c140bfaec71a75 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Wed, 21 Sep 2022 22:58:13 +0300 Subject: [PATCH] [#1808] .github: Add changelog workflow It checks whether the CHANGELOG.md was updated in a just-created PR. Signed-off-by: Pavel Karpy --- .github/workflows/changelog.yml | 28 ++++++++++++++++++++++++++++ CHANGELOG.md | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/changelog.yml diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 00000000..4c75061f --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,28 @@ +name: CHANGELOG check + +on: + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + name: Check for updates + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Get changed CHANGELOG + id: changelog-diff + uses: tj-actions/changed-files@v29 + with: + files: CHANGELOG.md + + - name: Fail if changelog not updated + if: steps.changelog-diff.outputs.any_changed == 'false' + uses: actions/github-script@v3 + with: + script: | + core.setFailed('CHANGELOG.md has not been updated') diff --git a/CHANGELOG.md b/CHANGELOG.md index 40bedf74..49ec7b8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ Changelog for NeoFS Node ### Added +- Changelog updates CI step (#1808) + ### Changed ### Fixed