claude-test/.gitea/workflows/claude-test.yml
evgenius 608781dcbd
All checks were successful
CI Smoke Test / smoke (push) Successful in 1m36s
Add Gitea Actions workflows for CI and Claude Code
2026-06-08 05:51:00 +00:00

27 lines
844 B
YAML

name: Claude Code Test
on:
workflow_dispatch:
jobs:
claude:
runs-on: ubuntu-latest
steps:
- name: Install Claude Code CLI
run: |
curl -fsSL https://claude.ai/install.sh | bash
export PATH="$HOME/.local/bin:$PATH"
claude --version
- name: Run Claude Code (requires API key)
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
if [ -z "$ANTHROPIC_API_KEY" ] || [ "$ANTHROPIC_API_KEY" = "REPLACE_ME_WHEN_READY" ]; then
echo "ANTHROPIC_API_KEY not configured — skipping Claude invocation."
echo "Add the secret in repo Settings → Secrets → Actions."
exit 0
fi
export PATH="$HOME/.local/bin:$PATH"
claude -p "Say hello in one short sentence." --output-format text