-
Notifications
You must be signed in to change notification settings - Fork 13
66 lines (62 loc) · 2.5 KB
/
main.yml
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
name: AUTOGPT
on:
workflow_dispatch : #only run when requested
# comment out the next 2 lines to stop processing new inputs
issue_comment:
types: [created]
jobs:
printEnv:
if: ${{ startsWith( github.event.comment.body, '/agent-action')}}
permissions: write-all
# repository:write
name: Print env
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_CONTEXT: ${{ toJson (github) }}
GITHUB_USER: ${{ github.event.comment.user.login }}
GITHUB_REPO: ${{ github.repository }}
run: |
echo USER "$GITHUB_USER"
echo USER "$GITHUB_REPO"
echo ACTOR "${{ github.actor }}"
echo TRIGGER "${{ github.triggering_actor }}"
echo LOGIN "${{ github.event.comment.user.login }}"
runJob:
if: ${{ startsWith( github.event.comment.body, '/agent-action')}}
permissions: write-all
name: Runevent
runs-on: ubuntu-latest
steps:
- name: run gh workflow
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_CONTEXT: ${{ toJson (github) }}
GITHUB_USER: ${{ github.event.comment.user.login }}
GITHUB_REPO: ${{ github.repository }}
COMMENT_BODY: $${{ github.event.comment.body }}
run: |
echo TEST ${{ contains(fromJson('["nektos/act", "jmikedupont2", "Mysticmarks"]'), github.actor ) }}
echo USER "$GITHUB_USER"
echo USER "$GITHUB_REPO"
echo ACTOR "${{ github.actor }}"
#echo TRIGGER "${{ github.triggering_actor }}"
#echo LOGIN "${{ github.event.comment.user.login }}"
#echo $GITHUB_CONTEXT | gh workflow run -R jmikedupont2/ai-ticket run.yml \
# --ref docker-live-source-no-build || echo skip
# call an another repo
# echo $GITHUB_CONTEXT | gh workflow run -R meta-introspector/ai-ticket run.yml || echo done
# call in our own repo
#echo $GITHUB_CONTEXT |
echo skip for now gh workflow run \
-f ai_name=github_seer \
-f ai_role=githubactionexpert \
-f ai_goal_1="write github actions" \
-f ai_goal_2="get user input" \
-f ai_goal_3="debug errors" \
-f ai_goal_4="$comment_body" \
-f ai_goal_count=4 \
-R meta-introspector/call-auto-gpt run.yml || echo done