-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.57 KB
/
ci.yml
File metadata and controls
55 lines (47 loc) · 1.57 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
name: Awesome List Generator
on:
schedule:
# Runs at 00:00 every Monday
- cron: '0 0 * * 1'
workflow_dispatch:
# Allows manual trigger from GitHub UI
jobs:
generate-awesome-list:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Cache repository data
uses: actions/cache@v3
with:
path: .github/cache
key: ${{ runner.os }}-repo-cache-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-repo-cache-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests PyGithub openai python-dotenv
- name: Generate Awesome List
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: python .github/scripts/generate_awesome_list.py
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: 'Update awesome-list README.md'
title: 'Update Awesome List'
body: 'This PR updates the awesome-list README.md with the latest public repositories in the organization.'
branch: 'update-awesome-list'
base: 'main'
add-paths: |
README.md
.github/cache/repo_cache.json