Update workflow to use Docker container for NixOS compatibility

This commit is contained in:
2026-01-12 10:50:28 +00:00
parent ad1628f02e
commit fb1cb5da5d

View File

@@ -1,3 +1,4 @@
# For God so loved the world — John 3:16
name: Claude Edit Workflow name: Claude Edit Workflow
on: on:
@@ -8,48 +9,47 @@ on:
jobs: jobs:
edit-chirho: edit-chirho:
# Only run if: has edit-request label AND (is issue event OR comment is NOT from bot) runs-on: claude-chirho
container:
image: node:20-bookworm
if: | if: |
contains(github.event.issue.labels.*.name, 'edit-request-chirho') && contains(github.event.issue.labels.*.name, 'edit-request-chirho') &&
(github.event_name == 'issues' || github.event.comment.user.login != 'claude-bot-chirho') (github.event_name == 'issues' || github.event.comment.user.login \!= 'claude-bot-chirho')
runs-on: claude-chirho
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Run Claude Code - name: Install Claude Code
env:
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_TITLE: ${{ github.event.issue.title }}
run: | run: |
cd $GITHUB_WORKSPACE npm install -g @anthropic-ai/claude-code
git config user.email "claude-bot@perffection.com"
git config user.name "Claude Bot"
cat << PROMPT_EOF | ~/.local/bin/claude -p --verbose --output-format stream-json --mcp-config ~/mcp-gitea-config-chirho.json --allowedTools "Read,Write,Edit,Glob,Grep,mcp__gitea-chirho__*" - name: Run Claude Code
You are editing a customer website based on feedback. run: |
Issue number ${ISSUE_NUMBER}: ${ISSUE_TITLE} claude --print "You are editing a customer website based on their feedback.
IMPORTANT: First use gitea_get_issue_thread_chirho to read the full conversation history. Read the issue at: ${{ github.server_url }}/${{ github.repository }}/issues/${{ github.event.issue.number }}
After reading the thread: The issue title is: ${{ github.event.issue.title }}
1. Look at the LATEST message from the site owner (not from claude-bot-chirho) The issue body is: ${{ github.event.issue.body }}
2. If there is a new request, make the edits
3. Post a brief comment summarizing what you did
4. If the latest owner message has already been addressed, do nothing
Working directory contains the site files. Make changes directly. Make the requested changes to the site files. Focus on clean, minimal edits
PROMPT_EOF 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 - name: Commit and push changes
run: | run: |
cd $GITHUB_WORKSPACE 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 git add -A
if git diff --staged --quiet; then if git diff --staged --quiet; then
echo "No changes to commit" echo "No changes to commit"
else else
git commit -m "Edit: ${{ github.event.issue.title }}" git commit -m "${{ github.event.issue.title }}"
git push git push
fi fi
# JESUS CHRIST IS LORD