Skip to content

Add support for multiple variants keyed on same hw model #45

Add support for multiple variants keyed on same hw model

Add support for multiple variants keyed on same hw model #45

name: Check Protected Files
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
pull-requests: write
jobs:
check-protected-files:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v46
with:
files: |
public/data/hardware-list.json
types/resources.ts
i18n/locales/**
- name: Check for changes to protected files
if: steps.changed-files.outputs.any_changed == 'true'
run: |
echo "The following protected files have been modified:"
echo "${{ steps.changed-files.outputs.all_changed_files }}"
echo ""
echo "❌ Changes to these files are not allowed via pull request:"
echo "• types/resources.ts - This file contains auto-generated resource definitions from the Meshtastic API."
echo "• i18n/locales/** - Translation files are managed through Crowdin"
echo ""
echo "If you need to modify these files, please:"
echo "1. For resources.ts: Contact a maintainer for manual updates"
echo "2. For translations: Use the Crowdin platform at https://meshtastic.crowdin.com/web-flasher"
echo ""
echo "Please remove changes to these files from your PR."
exit 1
- name: Success message
if: steps.changed-files.outputs.any_changed != 'true'
run: |
echo "✅ No changes to protected files detected. PR can proceed."