-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (48 loc) · 1.41 KB
/
Copy pathbookmark_summary.yml
File metadata and controls
56 lines (48 loc) · 1.41 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
name: Bookmark Summary
on:
push:
branches:
- main
paths:
- '**.md'
workflow_dispatch:
concurrency:
group: mygroup
cancel-in-progress: false
jobs:
summarize:
runs-on: ubuntu-latest
steps:
- name: Checkout bookmark-collection
uses: actions/checkout@v2
with:
path: bookmark-collection
- name: Checkout bookmark-summary
uses: actions/checkout@v2
with:
repository: jerrylususu/bookmark-summary
path: bookmark-summary
token: ${{ secrets.PAT }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r bookmark-summary/requirements.txt
- name: Process changes
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_API_MODEL: ${{ vars.OPENAI_API_MODEL }}
OPENAI_API_ENDPOINT: ${{ vars.OPENAI_API_ENDPOINT }}
run: |
python bookmark-summary/process_changes.py
- name: Commit changes to bookmark-summary
run: |
cd bookmark-summary
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Add new summaries" || echo "No changes to commit"
git push