-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (30 loc) · 1006 Bytes
/
DALLE.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
on:
issue_comment:
types: [created, edited]
jobs:
OpenAI_Reply:
if: "contains(github.event.issue.labels.*.name, 'image')"
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: install python packages
run: |
python -m pip install --upgrade pip
pip install openai
- name: run script
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OUTPUTFILE: ".github/comment-template.md"
BODY: ${{ github.event.comment.body }}
run: |
mkdir -p .github && wget https://raw.githubusercontent.com/xihajun/image/main/img/dalle.py && python dalle.py "$BODY"
- name: Create comment
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ github.event.issue.number }}
body-file: '.github/comment-template.md'