-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (48 loc) · 1.47 KB
/
build_registry.yml
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: Merge Source configs and write update Source-Registry
on:
pull_request:
branches:
- main
types:
- opened
- synchronize
- reopened
- edited
paths:
- '**/*.yml'
jobs:
validate_registry:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Install required Python packages
run: pip install -r .github/requirements.txt
- name: Merge Source configs and write Source-Registry
run: python .github/validate_registry.py
build_registry:
runs-on: ubuntu-latest
permissions:
contents: write
needs: validate_registry
steps:
- name: Check out the code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install required Python packages
run: pip install -r .github/requirements.txt
- name: Merge Source configs and write Source-Registry
run: |
python .github/build_registry.py .github/registry.yml
git config --local user.name "kyve-network"
git config --local user.email "[email protected]"
git add .
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to commit"
exit 0
fi
git commit -m "🎉 Update registry.yml"
git push origin HEAD:${{ github.head_ref }}