Skip to content

Commit 690cf93

Browse files
committed
auto commit indices changes with GitHub actions
1 parent 81b5986 commit 690cf93

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,21 @@ jobs:
3232
- name: Build
3333
run: npm run build
3434

35+
- name: Check uncommitted indices
36+
id: uncommitted_indices
37+
run: |
38+
echo "has_changes=$([ -n "$(git diff --name-only HEAD "**/index.ts")" ] && echo "true" || echo "false")" >> $GITHUB_OUTPUT
39+
40+
- name: Commit indices
41+
if: steps.uncommitted_indices.outputs.has_changes == 'true'
42+
run: |
43+
echo "${{ secrets.BOT_PGP_KEY }}" | gpg --import --batch
44+
git config --global user.name "Cloudnode [bot]"
45+
git config --global user.email "[email protected]"
46+
git add "**/index.ts"
47+
git commit -Sm "chore: update indices"
48+
git push
49+
3550
- name: Pack
3651
run: npm pack
3752

0 commit comments

Comments
 (0)