-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (37 loc) · 1.21 KB
/
Copy pathgenerate-catalog.yml
File metadata and controls
44 lines (37 loc) · 1.21 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
name: Generate Catalog
on:
push:
branches: [ main, develop ]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: false
jobs:
generate-catalog:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Fetch and rebase on latest remote changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch origin
git rebase origin/${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run catalog generation script
run: bash ./scripts/generate-catalog.sh
- name: Commit and push catalog if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add opencode-catalog.json
if git diff --cached --quiet; then
echo "Catalog unchanged, skipping commit and push"
else
git commit -m "chore: update catalog [skip ci]"
git push origin ${{ github.ref_name }}
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}