Skip to content

WIP: starting on GitHub Action and App branch #144

WIP: starting on GitHub Action and App branch

WIP: starting on GitHub Action and App branch #144

name: Check Release Notes Filenames
on:
pull_request:
jobs:
check-filenames:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2 # Ensures we have at least one previous commit for diffing
- name: Find invalid filenames in added/modified files
run: |
git fetch origin ${{ github.base_ref }} --depth=1
git diff --name-only --diff-filter=A origin/${{ github.base_ref }} | grep '^source/releasenotes/' | while read -r file; do
filename=$(basename "$file")
name="${filename%.*}" # Remove only the last extension
if [[ "$name" == *.* ]]; then
echo "Invalid file: $file"
exit 1
fi
done