-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 936 Bytes
/
generate_index.yml
File metadata and controls
39 lines (33 loc) · 936 Bytes
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
name: Generate API Index
on:
push:
branches:
- main
jobs:
generate-index:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install gitpython requests
- name: Generate libraries.json
run: python3 .github/scripts/generate_index.py .
- name: Check for changes
id: git-check
run: |
if [ -z "$(git status --porcelain)" ]; then
echo "changes=false" >> $GITHUB_ENV
else
echo "changes=true" >> $GITHUB_ENV
fi
- name: Create PR branch and push changes (if any)
if: env.changes == 'true'
run: .github/scripts/commit_and_pr.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}