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:
1 parent
8125818e24
commit
5c014823e0
9 files changed
+821
-383
No files matched your search
@@ -1,80 +1,75 @@
|
||||
name: Test Action (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: Test Action (Forgejo)
|
||||
'on':
|
||||
schedule:
|
||||
# Weekly Monday at 06:00 UTC
|
||||
- cron: "0 6 * * 1"
|
||||
- cron: '0 6 * * 1'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- main
|
||||
paths:
|
||||
- "src/**"
|
||||
- "action.yml"
|
||||
- ".forgejo/**"
|
||||
- "base-action/**"
|
||||
workflow_dispatch:
|
||||
|
||||
- src/**
|
||||
- action.yml
|
||||
- '.forgejo/**'
|
||||
- base-action/**
|
||||
workflow_dispatch: {}
|
||||
concurrency:
|
||||
group: test-action-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test-agent-mode:
|
||||
name: Test Agent Mode on Forgejo
|
||||
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: Checkout
|
||||
uses: https://${{ secrets.READ_REPO_TOKEN }}@git.wxs.ro/xternal/checkout@v6.0.2
|
||||
- name: Run Claude Code Action (agent mode)
|
||||
id: claude
|
||||
uses: './'
|
||||
with:
|
||||
prompt: Respond with exactly the text FORGEJO_PLATFORM_TEST_OK and nothing else. Do not use any tools.
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||
github_token: ${{ secrets.FORGEJO_CLAUDE_TOKEN }}
|
||||
platform: forgejo
|
||||
env:
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
- name: Verify execution output exists
|
||||
run: |-
|
||||
EXEC_FILE="${{ steps.claude.outputs.execution_file }}"
|
||||
if [ -z "$EXEC_FILE" ]; then
|
||||
echo "FAIL: execution_file output is empty"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f "$EXEC_FILE" ]; then
|
||||
echo "FAIL: execution file does not exist at: $EXEC_FILE"
|
||||
exit 1
|
||||
fi
|
||||
echo "OK: execution file exists at: $EXEC_FILE"
|
||||
|
||||
- name: Run Claude Code Action (agent mode)
|
||||
id: claude
|
||||
uses: ./
|
||||
with:
|
||||
prompt: "Respond with exactly the text FORGEJO_PLATFORM_TEST_OK and nothing else. Do not use any tools."
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||
github_token: ${{ secrets.FORGEJO_CLAUDE_TOKEN }}
|
||||
platform: "forgejo"
|
||||
env:
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
|
||||
- name: Verify execution output exists
|
||||
run: |
|
||||
EXEC_FILE="${{ steps.claude.outputs.execution_file }}"
|
||||
if [ -z "$EXEC_FILE" ]; then
|
||||
echo "FAIL: execution_file output is empty"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f "$EXEC_FILE" ]; then
|
||||
echo "FAIL: execution file does not exist at: $EXEC_FILE"
|
||||
exit 1
|
||||
fi
|
||||
echo "OK: execution file exists at: $EXEC_FILE"
|
||||
|
||||
# Check that the output contains our test marker
|
||||
if grep -q "FORGEJO_PLATFORM_TEST_OK" "$EXEC_FILE"; then
|
||||
echo "OK: Output contains expected test marker"
|
||||
else
|
||||
echo "WARN: Test marker not found in output (Claude may have formatted differently)"
|
||||
echo "--- Output contents (first 50 lines) ---"
|
||||
head -50 "$EXEC_FILE"
|
||||
fi
|
||||
|
||||
- name: Debug on failure
|
||||
if: failure()
|
||||
run: |
|
||||
echo "=== Debug Info ==="
|
||||
echo "Platform env: PLATFORM=$PLATFORM FORGEJO=$FORGEJO"
|
||||
echo "Server URL: $GITHUB_SERVER_URL"
|
||||
echo "API URL: $GITHUB_API_URL"
|
||||
echo "Event: ${{ github.event_name }}"
|
||||
echo "Actor: ${{ github.actor }}"
|
||||
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
|
||||
if grep -q "FORGEJO_PLATFORM_TEST_OK" "$EXEC_FILE"; then
|
||||
echo "OK: Output contains expected test marker"
|
||||
else
|
||||
echo "WARN: Test marker not found in output (Claude may have formatted differently)"
|
||||
echo "--- Output contents (first 50 lines) ---"
|
||||
head -50 "$EXEC_FILE"
|
||||
fi
|
||||
- name: Debug on failure
|
||||
if: failure()
|
||||
run: |-
|
||||
echo "=== Debug Info ==="
|
||||
echo "Platform env: PLATFORM=$PLATFORM FORGEJO=$FORGEJO"
|
||||
echo "Server URL: $GITHUB_SERVER_URL"
|
||||
echo "API URL: $GITHUB_API_URL"
|
||||
echo "Event: ${{ github.event_name }}"
|
||||
echo "Actor: ${{ github.actor }}"
|
||||
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
|
||||
Reference in new issue
Block a user