CI: check .xml structure drift against doc-en #2
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
| # https://docs.github.com/en/actions | |
| # Checks that the block skeleton of the .xml files changed in a PR stays a mirror | |
| # of doc-en. Each file is compared to doc-en at the revision it declares to mirror | |
| # (EN-Revision), so a lagging file does not raise a false positive. The script | |
| # emits its own ::error annotations. | |
| name: "Structure" | |
| on: | |
| pull_request: | |
| branches: ["master"] | |
| types: [opened, synchronize] | |
| permissions: | |
| contents: read | |
| jobs: | |
| structure: | |
| name: "Check XML" | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: "Checkout translation" | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: "Checkout php/doc-en" | |
| uses: actions/checkout@v4 | |
| with: | |
| path: en | |
| repository: php/doc-en | |
| fetch-depth: 0 | |
| - name: "Check structure" | |
| run: | | |
| BASE="${{ github.event.pull_request.base.sha }}" | |
| git fetch --no-tags --depth=1 origin "$BASE" | |
| git diff --name-only "$BASE"...HEAD -- '*.xml' \ | |
| | php8.1 .github/scripts/check-structure.php |