diff --git a/.github/workflows/update-css-referential.yml b/.github/workflows/update-css-referential.yml index df62961..e7eb5b9 100644 --- a/.github/workflows/update-css-referential.yml +++ b/.github/workflows/update-css-referential.yml @@ -7,8 +7,13 @@ on: permissions: {} +concurrency: + group: update-css-referential + cancel-in-progress: false + jobs: update-css-referential: + if: github.ref_name == github.event.repository.default_branch runs-on: ubuntu-latest permissions: contents: write @@ -27,14 +32,16 @@ jobs: - name: Generate CSS Referential run: composer run-script generate-css-referentials - - name: Push changes and create pull request - uses: peter-evans/create-pull-request@3ffccacd46053766916f087ce41d627c0b8cf2d1 # v8.1.3 + - name: Validate generated CSS Referential + run: composer run-script ci + + - name: Create and merge validated CSS Referential update + uses: hoverkraft-tech/ci-github-common/actions/create-and-merge-pull-request@a86c260e07b11a7a0ca3b7205bbdba9908230917 # 4.3.0 with: branch: update-css-referential + bypass-branch-protection: "false" add-paths: | src/CssLint/Referential - sign-commits: true - signoff: true title: "feat: update CSS Referential" body: | This pull request updates the CSS referential files in the `src/CssLint/Referential` directory. diff --git a/docs/development.md b/docs/development.md index 3a6d8b6..ccb6064 100644 --- a/docs/development.md +++ b/docs/development.md @@ -41,6 +41,18 @@ Regenerate the checked-in CSS references from W3C and MDN data with: composer generate-css-referentials ``` +The scheduled `Update CSS Referential` workflow runs every Sunday and can also be +started manually from `main`. It regenerates the references, runs `composer ci`, +then uses the shared `create-and-merge-pull-request` action to commit only +`src/CssLint/Referential` and merge the update. A validation failure prevents the +PR update and merge. Concurrent updates are serialized. + +Validation runs before the shared action: PR workflows created with +`GITHUB_TOKEN` require approval. The action checks that the PR head has not changed +after creation. This workflow sets `bypass-branch-protection: "false"` to respect +active branch rules without requesting an administrator bypass. This process does +not require GitHub's optional auto-merge setting. + MDN property aliases are included when at least one browser reports support without a removal version. Aliases retain their own classification when available; otherwise, they enter the non-standard compatibility list. Property value aliases are not imported as property names. Maintain manual non-standard property and at-rule additions in [`css-referential-overrides.php`](../css-referential-overrides.php) at the repository root. The generator rejects entries already supplied by W3C or MDN, so remove an override when it becomes available upstream.