Skip to content

Commit c0911df

Browse files
committed
feat: use v6, rm manual git flow
1 parent f89209e commit c0911df

File tree

1 file changed

+8
-25
lines changed

1 file changed

+8
-25
lines changed

.github/workflows/update-chains.yml

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
schedule:
55
- cron: '20 16 * * FRI' # Runs every Friday at 16:20 UTC
66
workflow_dispatch: # Can be dispatched manually
7-
push:
8-
branches:
9-
- wallet-network-schema
107

118
jobs:
129
update-chains:
@@ -30,29 +27,15 @@ jobs:
3027
- name: Update chains data
3128
run: npx ts-node -O '{"module":"commonjs"}' ./src/scripts/update-chains.ts
3229

33-
- name: Commit changes
34-
id: commit-changes
35-
run: |
36-
git config --global user.name 'github-actions[bot]'
37-
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
38-
BRANCH_NAME=update-chains-$(date +%Y%m%dT%H%M%S)
39-
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
40-
git checkout -b $BRANCH_NAME
41-
git add -A
42-
if git diff-index --quiet HEAD --; then
43-
echo "No changes to commit"
44-
exit 0
45-
fi
46-
git commit -m 'Update chains data'
47-
git push origin $BRANCH_NAME
48-
echo "CHANGES=true" >> $GITHUB_ENV
49-
5030
- name: Create Pull Request
51-
if: env.CHANGES == 'true'
52-
uses: peter-evans/create-pull-request@v3
31+
uses: peter-evans/create-pull-request@v6
5332
with:
5433
token: ${{ secrets.GITHUB_TOKEN }}
55-
branch: ${{ env.BRANCH_NAME }}
34+
branch: update-chains
35+
branch-suffix: timestamp
36+
commit-message: |
37+
Update chains data
5638
base: dev
57-
title: 'Update chains data'
58-
body: 'Automated update of chains data.'
39+
title: Update chains data
40+
body: Automated update of chains data from https://chainid.network/chains.json
41+
labels: update 🔄

0 commit comments

Comments
 (0)