-
Notifications
You must be signed in to change notification settings - Fork 141
52 lines (44 loc) · 1.18 KB
/
update-registry.yml
File metadata and controls
52 lines (44 loc) · 1.18 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
name: Update Registry
on:
push:
branches: [ main ]
paths:
- 'widgets/**'
- 'registry/**'
- '.github/workflows/update-registry.yml'
- 'README_template.md'
- 'GALLERY_template.md'
concurrency:
group: update-registry
cancel-in-progress: false
permissions:
contents: write
jobs:
update-registry:
if: github.repository == 'glanceapp/community-widgets'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache-dependency-path: registry/go.sum
- name: Run registry update
run: |
cd registry
go run .
- name: Commit and push changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "GitHub Action"
git add README.md GALLERY.md registry/widgets.json
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "Update registry"
git push
fi