feat(skin): add Aurelia Courtyard #373
Workflow file for this run
This file contains hidden or 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: Restrict skin-contribution PRs | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, labeled, unlabeled] | |
| paths-ignore: | |
| - '.github/workflows/**' | |
| permissions: | |
| pull-requests: write | |
| contents: read | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| if: contains(github.event.pull_request.labels.*.name, 'contribute-skin') && !contains(github.event.pull_request.labels.*.name, 'architecture') | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 2 | |
| - name: Get changed files | |
| id: files | |
| run: | | |
| FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | tr '\n' ' ') | |
| echo "files=$FILES" >> "$GITHUB_OUTPUT" | |
| - name: Check for architecture changes | |
| id: check | |
| run: | | |
| BLOCKED=false | |
| for f in ${{ steps.files.outputs.files }}; do | |
| case "$f" in | |
| src/*|scripts/*|tsconfig.json|rollup.config.js|.github/workflows/*|.github/PULL_REQUEST_TEMPLATE.md) | |
| echo "BLOCKED file: $f" | |
| BLOCKED=true | |
| ;; | |
| esac | |
| done | |
| echo "blocked=$BLOCKED" >> "$GITHUB_OUTPUT" | |
| - name: Validate strings.json has version field | |
| id: validate_version | |
| run: | | |
| for f in ${{ steps.files.outputs.files }}; do | |
| if [[ "$f" =~ ^skins-pro/([^/]+)/strings\.json$ ]]; then | |
| SKIN="${BASH_REMATCH[1]}" | |
| if [ -f "$f" ]; then | |
| VERSION=$(jq -r '.version // empty' "$f") | |
| if [ -z "$VERSION" ]; then | |
| echo "Missing 'version' field in $f" | |
| exit 1 | |
| fi | |
| echo "OK: $f has version=$VERSION" | |
| fi | |
| fi | |
| done | |
| - name: Fail if architecture files changed | |
| if: steps.check.outputs.blocked == 'true' | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| core.setFailed('Skin-contribution PRs must not modify architecture files (src/, scripts/, tsconfig.json, rollup.config.js, .github/workflows/, .github/PULL_REQUEST_TEMPLATE.md). Please revert these changes.'); |