Update Canvas Documentation Context #7
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: Update Canvas SDK Context | |
| on: | |
| schedule: | |
| # Every Monday at 10am UTC | |
| - cron: '0 10 * * 1' | |
| workflow_dispatch: # Allow manual triggering | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-context: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Download Canvas SDK context | |
| run: | | |
| # Create directory if it doesn't exist | |
| mkdir -p canvas-plugin-assistant/skills/canvas-sdk | |
| # Download the context file | |
| curl -sSL https://raw.githubusercontent.com/Medical-Software-Foundation/canvas/refs/heads/main/coding_agent_context.txt \ | |
| -o canvas-plugin-assistant/skills/canvas-sdk/coding_agent_context.txt | |
| - name: Configure Git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Commit and push if changes | |
| run: | | |
| git add canvas-plugin-assistant/skills/canvas-sdk/coding_agent_context.txt | |
| # Check if there are changes to commit | |
| if git diff --staged --quiet; then | |
| echo "No changes to commit" | |
| else | |
| git commit -m "Update Canvas SDK context [automated]" | |
| git push | |
| fi |