Skip to content

Instantly share code, notes, and snippets.

@jiimaho
Last active February 17, 2026 07:26
Show Gist options
  • Select an option

  • Save jiimaho/8ab08d5283677d60a015a9c80ccc5d29 to your computer and use it in GitHub Desktop.

Select an option

Save jiimaho/8ab08d5283677d60a015a9c80ccc5d29 to your computer and use it in GitHub Desktop.
GitHub actions workflow that runs Cursor with the prompt of a Claude Code command. Store this file under .github/workflows/ in your project.
name: Agent McNuggets - NuGet Package Updates
on:
schedule:
# Run every Sunday at 13:00 UTC
- cron: '0 13 * * 0'
workflow_dispatch:
# Allow manual triggering for testing
permissions:
contents: write # Required for creating branches and commits
pull-requests: write # Required for creating pull requests
issues: write # Required for PR operations
jobs:
update-packages:
name: Update NuGet packages with Cursor agent
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0 # Full history for git operations
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Install Cursor CLI
run: |
export DEBIAN_FRONTEND=noninteractive
export PAGER=cat
export TERM=dumb
curl https://cursor.com/install -fsS | bash
echo "$HOME/.cursor/bin" >> $GITHUB_PATH
- name: Verify Cursor CLI
run: cursor-agent --version || echo "Cursor CLI installation completed"
- name: Configure Git
run: |
git config user.name "cursor[bot]"
git config user.email "cursor[bot]@users.noreply.github.com"
- name: Run Cursor Agent for NuGet Updates
timeout-minutes: 20
env:
CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Running Cursor CLI with nugetupdate prompt..."
PROMPT_TEXT=$(cat .claude/commands/nugetupdate.md)
cursor-agent --force --print "$PROMPT_TEXT" --model opus-4.5
- name: Workflow Summary
if: always()
run: |
echo "## Cursor NuGet Package Update Workflow" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Status**: ${{ job.status }}" >> $GITHUB_STEP_SUMMARY
echo "**Triggered**: ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY
echo "**Run**: ${{ github.run_number }}" >> $GITHUB_STEP_SUMMARY
echo "**Agent**: Cursor CLI" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
# Check if a PR was created (find any branch starting with nuget-update/)
PR_URL=$(gh pr list --json headRefName,url --jq '[.[] | select(.headRefName | startswith("nuget-update/"))][0].url // empty')
if [ -n "$PR_URL" ]; then
echo "**Pull Request**: $PR_URL" >> $GITHUB_STEP_SUMMARY
else
echo "**Pull Request**: No PR created (no updates needed or error occurred)" >> $GITHUB_STEP_SUMMARY
fi
env:
GH_TOKEN: ${{ github.token }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment