Skip to content

CI: hourly Canvas App pin check (like Copper's canvas.yml) - #6

Open
collinrijock wants to merge 1 commit into
canvas/pin-canvas-appfrom
canvas/hourly-canvas-app-sync
Open

collinrijock wants to merge 1 commit into
canvas/pin-canvas-appfrom
canvas/hourly-canvas-app-sync

Conversation

@collinrijock

Copy link
Copy Markdown
Contributor

This adds an hourly Canvas App pin check, .github/workflows/canvas-app.yml, modelled on Copper's .github/workflows/canvas.yml with copper-cloud's paths. It is stacked on #5, which adds the pin and packaging/sync-canvas-app.sh.

  • Pull requests that touch crates/copper-cloud/assets/canvas-app.html, CANVAS_APP_REF, packaging/sync-canvas-app.sh or this workflow run packaging/sync-canvas-app.sh --check, which fails if the vendored page is not the pinned build.

  • Hourly (at :23), and on demand through workflow_dispatch, the workflow pins canvas-app main on top of main. A canvas-app commit that leaves dist/web/index.html unchanged keeps the pin. When the page has changed, the workflow:

    • commits on canvas/take-canvas-app;
    • force-pushes that branch, but only when its tree differs from what is already pushed, so the PR's CI isn't re-run every hour;
    • opens or updates the issue "Canvas: canvas-app moved on" with the canvas-app commit list and a link that opens the PR. The org bars Actions from opening pull requests, so a person opens it.

    Once main has caught up, the workflow closes the issue.

  • Permissions: contents: read by default; the bump job gets contents: write and issues: write.

I checked the pin/compare step locally. On #5's first commit (pin 62228f5) it reports changed=true, and on #5's head (c425198) it reports changed=false and leaves the tree clean.

🤖 Generated with Claude Code

.github/workflows/canvas-app.yml:
- pull requests touching the vendored page, its pin or the sync script run
  packaging/sync-canvas-app.sh --check;
- hourly (and by hand) it pins canvas-app main; when the web build changed it pushes
  canvas/take-canvas-app (only when that branch's tree differs) and opens or updates the
  issue "Canvas: canvas-app moved on" with the commit list and a link that opens the PR,
  since the org bars Actions from opening pull requests; once main has caught up it
  closes the issue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant