w38b: next try to fix olsr route flapping #548
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Check interface names | |
on: [push, pull_request] # yamllint disable-line rule:truthy | |
jobs: | |
check-interface-names: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Get a list of changed files and pass them to the script | |
- name: Get Changed Files and Run interface name check | |
run: | | |
# Fetch previous commits for comparison | |
git fetch origin main | |
# Get list of changed files compared to main branch | |
changed_files=$(git diff --name-only origin/main) | |
# Filter out only the location files from the list of changed files | |
location_files=$(echo "$changed_files" | grep -E '^locations/.*\.yml$' || true) | |
if [ -z "$location_files" ]; then | |
echo "No location files changed, skipping check." | |
exit 0 | |
fi | |
# Run the interface name check script with the filtered location files | |
./.github/checks/check-interface-names.sh "$location_files" |