Skip to content

feat(standards): add scheduled sync workflow from AzureLocal/platform#42

Merged
kristopherjturner merged 1 commit intomainfrom
feat/phase-1-standards-sync-workflow
Apr 12, 2026
Merged

feat(standards): add scheduled sync workflow from AzureLocal/platform#42
kristopherjturner merged 1 commit intomainfrom
feat/phase-1-standards-sync-workflow

Conversation

@kristopherjturner
Copy link
Copy Markdown
Contributor

Summary

Wires this site up as the rendering consumer for AzureLocal/platform/standards/, per ADR-0002. Part of Phase 1 (standards consolidation) of the platform rollout.

Triggers:

  • Weekly cron (Mondays 06:00 UTC) — safety-net
  • workflow_dispatch — manual sync with optional ref input (branch or tag)
  • repository_dispatch: platform-standards-updated — fired by the platform release workflow on every version tag (wiring on the platform side is a follow-up; cron covers until then)

Behavior: copies platform/standards/*.mdx into this repo's standards/, detects diff, opens a PR titled chore(standards): sync from AzureLocal/platform if anything changed. No-op if clean.

Why not auto-commit

The sync could push directly to main, but going through a PR preserves:

  • Deploy-to-Pages gating (the site's deploy.yml requires main pushes to be intentional)
  • A visible audit trail of content drift between platform releases
  • A review step for rendering regressions (Docusaurus sometimes chokes on new MDX constructs)

Downstream

After merge + first successful run, this unblocks deleting local /standards/ folders from the 6 product repos (azurelocal-avd, azurelocal-sofs-fslogix, azurelocal-loadtools, azurelocal-vm-conversion-toolkit, azurelocal-copilot, azurelocal-nutanix-migration) — each replaced by a STANDARDS.md stub pointing at platform.

Test plan

  • Workflow file passes YAML syntax check
  • Manual workflow_dispatch against platform_ref=main produces a no-op (site and platform now identical byte-for-byte)
  • Manual workflow_dispatch against platform_ref=<future-tag> opens a PR if platform tagged new content
  • Weekly cron fires on its next schedule window (Monday 06:00 UTC)

🤖 Generated with Claude Code

Per ADR-0002, standards are authored in AzureLocal/platform/standards/
and this site renders them. This workflow pulls the canonical copies
weekly (Mon 06:00 UTC), on manual dispatch, or on repository_dispatch
fired from a platform release, and opens a sync PR if the files diverge.

The PR is mechanical — reviewers check rendering, not content. Content
edits land as PRs against AzureLocal/platform.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 12, 2026 23:07
@kristopherjturner kristopherjturner merged commit 7c44e19 into main Apr 12, 2026
3 of 4 checks passed
@kristopherjturner kristopherjturner deleted the feat/phase-1-standards-sync-workflow branch April 12, 2026 23:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub Actions workflow to periodically and manually sync standards/*.mdx from AzureLocal/platform into this repo and open a PR when differences are detected, aligning with ADR-0002’s “single source of truth” approach.

Changes:

  • Introduces a scheduled + manual + repository_dispatch workflow trigger for standards syncing.
  • Checks out AzureLocal/platform at a selected ref and copies standards/*.mdx into this repo.
  • Opens a PR via peter-evans/create-pull-request when changes are detected.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +47 to +48
# Copy only .mdx (README.md on platform is an index for humans, not a rendered page)
find _platform/standards -maxdepth 1 -name "*.mdx" -print0 \
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The copy step only overwrites/creates files; it never removes standards/*.mdx that were deleted (or renamed) upstream in AzureLocal/platform. That means the sync can report a clean diff while stale local standards pages remain and continue to render. Consider mirroring instead (e.g., delete existing standards/*.mdx before copying, or use rsync --delete for just the .mdx files) so upstream deletions are reflected here.

Suggested change
# Copy only .mdx (README.md on platform is an index for humans, not a rendered page)
find _platform/standards -maxdepth 1 -name "*.mdx" -print0 \
# Mirror only top-level .mdx files (README.md on platform is an index
# for humans, not a rendered page) so upstream deletions/renames are
# reflected locally without touching non-.mdx files.
find standards -maxdepth 1 -name "*.mdx" -type f -delete
find _platform/standards -maxdepth 1 -name "*.mdx" -type f -print0 \

Copilot uses AI. Check for mistakes.
Comment on lines +55 to +60
if git diff --quiet --exit-code -- standards/; then
echo "changed=false" >> "$GITHUB_OUTPUT"
echo "No standards changes — nothing to sync."
else
echo "changed=true" >> "$GITHUB_OUTPUT"
git diff --stat -- standards/
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git diff --quiet -- standards/ does not detect untracked files. If AzureLocal/platform adds a new standards/*.mdx, the copy step creates an untracked file here and this step can still report changed=false, so no PR is opened. Use a detector that includes untracked files (e.g., git status --porcelain -- standards/), or stage intent-to-add (git add -N standards/) before diffing.

Suggested change
if git diff --quiet --exit-code -- standards/; then
echo "changed=false" >> "$GITHUB_OUTPUT"
echo "No standards changes — nothing to sync."
else
echo "changed=true" >> "$GITHUB_OUTPUT"
git diff --stat -- standards/
if [ -z "$(git status --porcelain -- standards/)" ]; then
echo "changed=false" >> "$GITHUB_OUTPUT"
echo "No standards changes — nothing to sync."
else
echo "changed=true" >> "$GITHUB_OUTPUT"
git status --short -- standards/

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants