Files
test-site-chirho/.gitea/workflows/edit-chirho.yaml

55 lines
1.7 KiB
YAML

# For God so loved the world — John 3:16
name: Claude Edit Workflow
on:
issues:
types: [opened, reopened]
issue_comment:
types: [created]
jobs:
edit-chirho:
runs-on: claude-chirho
container:
image: node:20-bookworm
if: |
contains(github.event.issue.labels.*.name, 'edit-request-chirho') &&
(github.event_name == 'issues' || github.event.comment.user.login \!= 'claude-bot-chirho')
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Claude Code
run: |
npm install -g @anthropic-ai/claude-code
- name: Run Claude Code
run: |
claude --print "You are editing a customer website based on their feedback.
Read the issue at: ${{ github.server_url }}/${{ github.repository }}/issues/${{ github.event.issue.number }}
The issue title is: ${{ github.event.issue.title }}
The issue body is: ${{ github.event.issue.body }}
Make the requested changes to the site files. Focus on clean, minimal edits
that match the existing code style. Follow the _chirho naming convention."
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY_CHIRHO }}
- name: Commit and push changes
run: |
git config --global user.name "Claude Bot"
git config --global user.email "claude-bot-chirho@perffection.com"
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git add -A
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "${{ github.event.issue.title }}"
git push
fi
# JESUS CHRIST IS LORD