diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml index 84b90af06b..41363d55ea 100644 --- a/.github/workflows/release-notes.yml +++ b/.github/workflows/release-notes.yml @@ -13,8 +13,23 @@ jobs: steps: - name: Checkout uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + fetch-depth: 0 + - name: Get changed files + id: changed-files + run: | + git fetch origin ${{ github.base_ref }} + CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD) + NON_DOCS_FILES=$(echo "$CHANGED_FILES" | grep -v "^packages/docs/" || true) + + if [ -z "$NON_DOCS_FILES" ] && [ -n "$CHANGED_FILES" ]; then + echo "only_docs=true" >> $GITHUB_OUTPUT + echo "only documentation files changed, skipping release notes check" + else + echo "only_docs=false" >> $GITHUB_OUTPUT + fi - name: Check release notes - if: startsWith(github.head_ref, 'release/') == false + if: startsWith(github.head_ref, 'release/') == false && steps.changed-files.outputs.only_docs != 'true' uses: actualbudget/actions/release-notes/check@main - name: Generate release notes if: startsWith(github.head_ref, 'release/') == true diff --git a/upcoming-release-notes/6122.md b/upcoming-release-notes/6122.md new file mode 100644 index 0000000000..e2fe12b5e0 --- /dev/null +++ b/upcoming-release-notes/6122.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [matt-fidd] +--- + +Remove release note check for documentation changes