Files
matrix-rust-sdk/.github/workflows/detect-long-path.yml
dependabot[bot] 7b8671d82c chore(deps): bump tj-actions/changed-files
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from c6634ca281a9fc05b03bee224ba00910cb78ab6e to 115870536a85eaf050e369291c7895748ff12aea.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](c6634ca281...115870536a)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-version: 115870536a85eaf050e369291c7895748ff12aea
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-03 11:17:12 +02:00

36 lines
1.1 KiB
YAML

# Check if the path of changed file is longer than 260 characters
# that windows filesystem allows
name: Detect long path among changed files
on:
workflow_dispatch:
pull_request: # focus on the changed files in current PR
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
long-path:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check for changed files
id: changed-files
uses: tj-actions/changed-files@115870536a85eaf050e369291c7895748ff12aea
- name: Detect long path
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} # ignore the deleted files
MAX_LENGTH: 120 # set max length to 120, considering the base path of app project that uses matrix-sdk
run: |
for file in ${ALL_CHANGED_FILES}; do
if [ ${#file} -gt $MAX_LENGTH ]; then
echo "File path is too long. Length: ${#file}, Path: $file"
exit 1
fi
done
exit 0