4
4
schedule :
5
5
- cron : ' 20 16 * * FRI' # Runs every Friday at 16:20 UTC
6
6
workflow_dispatch : # Can be dispatched manually
7
- push :
8
- branches :
9
- - wallet-network-schema
10
7
11
8
jobs :
12
9
update-chains :
@@ -30,29 +27,15 @@ jobs:
30
27
- name : Update chains data
31
28
run : npx ts-node -O '{"module":"commonjs"}' ./src/scripts/update-chains.ts
32
29
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
-
50
30
- 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
53
32
with :
54
33
token : ${{ secrets.GITHUB_TOKEN }}
55
- branch : ${{ env.BRANCH_NAME }}
34
+ branch : update-chains
35
+ branch-suffix : timestamp
36
+ commit-message : |
37
+ Update chains data
56
38
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