feat: migrate workflows to kcl-ci standard

- Add .forgejo/kcl-ci/ with kcl.mod, main.k, Taskfile.yaml
- claude.yml: use claude.k module (fixes #comment YAML validation error,
  removes duplicate pull_request_comment trigger)
- ci.yml: add paths-ignore for kcl-ci paths, named jobs for check constants
- test-action.yml: regenerated from KCL (functionally identical)
- upstream-sync.yml: regenerated from KCL (functionally identical)
- kcl-ci-build.yml: new auto-regeneration workflow (waits for CI checks)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Vlad MocanuandClaude Opus 4.6 committed 2026-02-27 11:40:47 +02:00
1 parent 8125818e24
commit 5c014823e0
9 files changed
+821 -383

No files matched your search

+46 -76
View File
@@ -1,86 +1,56 @@
name: Claude Code (Forgejo)
# Generated by KCL v1.34.3 - DO NOT EDIT
# Source: .forgejo/kcl-ci/main.k
# kcl-ci local: ~/stuff/gitrepos/wxs/actions/kcl-ci
# kcl-ci remote: https://git.wxs.ro/actions/kcl-ci
on:
name: Claude Code
'on':
issue_comment:
types: [created]
types:
- created
pull_request_review_comment:
types: [created]
types:
- created
issues:
types: [opened, assigned, labeled]
# Forgejo never fires pull_request_review — it sends pull_request_comment
# for both review comments AND full reviews. Kept for GitHub compatibility.
types:
- opened
- assigned
- labeled
pull_request_review:
types: [submitted]
types:
- submitted
concurrency:
group: claude-${{ github.event.issue.number || github.event.pull_request.number }}-${{ github.run_id }}
group: claude-${{ github.event.issue.number || github.event.pull_request.number }}
jobs:
claude:
# Forgejo workflow if: limitations (expression parser rejects '#' comments):
# - pull_request_review_comment / pull_request_comment: Forgejo collapses both
# review comments and full reviews into pull_request_comment. Cannot gate on
# @claude here — payload fields are empty (run 12084). Check in trigger.ts.
# - pull_request_review: Only fires on GitHub, dead code on Forgejo.
# - issues: Forgejo does not populate github.event.action (run 12061 skipped
# despite action being 'labeled'). Let all through; trigger.ts validates.
if: >-
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
# Forgejo collapses both pull_request_review_comment AND pull_request_review
# into pull_request_comment. We cannot gate on @claude here because Forgejo's
# webhook payload does not populate github.event.comment.body or
# github.event.review.body for these events (tested: run 12084 was skipped).
# The @claude check is handled in trigger.ts which reads the actual payload.
(github.event_name == 'pull_request_review_comment' || github.event_name == 'pull_request_comment') ||
# This condition only fires on GitHub (Forgejo never sends pull_request_review).
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues')
if: ((github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment') && contains(github.event.comment.body, '@claude')) || (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || (github.event_name == 'issues')
runs-on: grunt
steps:
- name: Checkout
uses: https://${{ secrets.READ_REPO_TOKEN }}@git.wxs.ro/xternal/checkout@v6.0.2
with:
fetch-depth: 1
- name: Run Claude Code
id: claude
uses: ./
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
github_token: ${{ secrets.CLAUDE_BOT_TOKEN }}
bot_id: "48"
bot_name: "claude"
bot_email: "claude@wxs.ro"
platform: "forgejo"
assignee_trigger: "claude"
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
- name: Debug on failure
if: failure()
run: |
echo "=== Debug Info ==="
echo "Platform: PLATFORM=$PLATFORM FORGEJO=$FORGEJO"
echo "Server URL: $GITHUB_SERVER_URL"
echo "API URL: $GITHUB_API_URL"
echo "Event: ${{ github.event_name }} / ${{ github.event.action }}"
echo "Actor: ${{ github.actor }}"
echo ""
echo "=== Event Payload ==="
echo "comment.body: ${{ github.event.comment.body }}"
echo "comment.id: ${{ github.event.comment.id }}"
echo "review.body: ${{ github.event.review.body }}"
echo "review.id: ${{ github.event.review.id }}"
echo ""
if [ -f "$GITHUB_EVENT_PATH" ]; then
echo "--- GITHUB_EVENT_PATH ---"
cat "$GITHUB_EVENT_PATH"
fi
echo ""
EXEC_FILE="${{ steps.claude.outputs.execution_file }}"
if [ -f "$EXEC_FILE" ]; then
echo "--- Execution file contents ---"
cat "$EXEC_FILE"
else
echo "No execution file found"
fi
- name: Checkout
uses: https://${{ secrets.READ_REPO_TOKEN }}@git.wxs.ro/xternal/checkout@v6.0.2
- name: Run Claude Code
id: claude
uses: https://${{ secrets.READ_REPO_TOKEN }}@git.wxs.ro/actions/claude-code-action@main
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
github_token: ${{ secrets.CLAUDE_BOT_TOKEN }}
bot_id: '48'
bot_name: claude
bot_email: claude@wxs.ro
platform: forgejo
assignee_trigger: claude
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
- name: Debug on failure
if: failure()
run: |
echo "=== Debug Info ==="
echo "Event: ${{ github.event_name }} / ${{ github.event.action }}"
echo "Actor: ${{ github.actor }}"
EXEC_FILE="${{ steps.claude.outputs.execution_file }}"
if [ -f "$EXEC_FILE" ]; then
echo "--- Execution file ---"
cat "$EXEC_FILE"
else
echo "No execution file"
fi