114 lines
2.9 KiB
YAML
114 lines
2.9 KiB
YAML
name: github activity to openclaw
|
|
|
|
on:
|
|
repository_dispatch:
|
|
types:
|
|
- github_activity
|
|
issues:
|
|
types:
|
|
- opened
|
|
- reopened
|
|
- edited
|
|
- closed
|
|
- labeled
|
|
- unlabeled
|
|
- assigned
|
|
- unassigned
|
|
issue_comment:
|
|
types:
|
|
- created
|
|
- edited
|
|
pull_request_target:
|
|
types:
|
|
- opened
|
|
- reopened
|
|
- synchronize
|
|
- ready_for_review
|
|
- converted_to_draft
|
|
- edited
|
|
- closed
|
|
- labeled
|
|
- unlabeled
|
|
pull_request_review:
|
|
types:
|
|
- submitted
|
|
- edited
|
|
- dismissed
|
|
pull_request_review_comment:
|
|
types:
|
|
- created
|
|
- edited
|
|
workflow_run:
|
|
workflows:
|
|
- sweep
|
|
- repair cluster worker
|
|
- repair publish cluster results
|
|
- commit review
|
|
types:
|
|
- completed
|
|
|
|
permissions:
|
|
contents: read
|
|
actions: read
|
|
issues: read
|
|
pull-requests: read
|
|
|
|
env:
|
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
|
|
|
concurrency:
|
|
group: github-activity-${{ github.event_name }}-${{ github.run_id }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
notify:
|
|
if: >-
|
|
${{
|
|
!(github.event_name == 'pull_request_target' && github.event.action == 'synchronize') &&
|
|
!(github.event_name == 'repository_dispatch' && github.event.client_payload.activity.type == 'pull_request_target' && github.event.client_payload.activity.action == 'synchronize') &&
|
|
!(github.event_name == 'workflow_run' && contains(fromJSON('["success","neutral","skipped"]'), github.event.workflow_run.conclusion))
|
|
}}
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
filter: blob:none
|
|
persist-credentials: false
|
|
|
|
- name: Prepare notifier runtime
|
|
timeout-minutes: 5
|
|
run: |
|
|
set -euo pipefail
|
|
node --version
|
|
corepack enable
|
|
for attempt in 1 2 3; do
|
|
if corepack prepare "pnpm@10.33.2" --activate; then
|
|
break
|
|
fi
|
|
if [ "$attempt" -eq 3 ]; then
|
|
exit 1
|
|
fi
|
|
sleep "$((attempt * 10))"
|
|
done
|
|
for attempt in 1 2 3; do
|
|
if pnpm install --frozen-lockfile; then
|
|
break
|
|
fi
|
|
if [ "$attempt" -eq 3 ]; then
|
|
exit 1
|
|
fi
|
|
sleep "$((attempt * 10))"
|
|
done
|
|
pnpm run build:repair
|
|
|
|
- name: Feed activity to OpenClaw
|
|
env:
|
|
CLAWSWEEPER_OPENCLAW_HOOK_URL: ${{ secrets.CLAWSWEEPER_OPENCLAW_HOOK_URL }}
|
|
CLAWSWEEPER_OPENCLAW_HOOK_TOKEN: ${{ secrets.CLAWSWEEPER_OPENCLAW_HOOK_TOKEN }}
|
|
CLAWSWEEPER_OPENCLAW_AGENT_ID: ${{ vars.CLAWSWEEPER_OPENCLAW_AGENT_ID || 'clawsweeper' }}
|
|
CLAWSWEEPER_DISCORD_TARGET: ${{ vars.CLAWSWEEPER_DISCORD_TARGET }}
|
|
run: |
|
|
set -euo pipefail
|
|
pnpm run repair:notify-github-activity -- --write-report
|