forked from openclaw/clawsweeper
-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (106 loc) · 2.91 KB
/
github-activity.yml
File metadata and controls
113 lines (106 loc) · 2.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
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