Skip to content

Commit

Permalink
ci: add chains update
Browse files Browse the repository at this point in the history
  • Loading branch information
zakarialounes committed Sep 19, 2024
1 parent 6501684 commit 7abdff7
Show file tree
Hide file tree
Showing 7 changed files with 531 additions and 2 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Update chains config

on:
schedule:
- cron: '* * * * *'
workflow_dispatch:

jobs:
cron:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ ubuntu-latest ]
node: [ 20 ]

steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Checkout 📡
uses: actions/checkout@v4
with:
submodules: recursive

- name: Cache node_modules 💰
uses: actions/cache@v4
with:
path: node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}

- name: Install Dependencies 🧬
if: steps.cache.outputs.cache-hit != 'true'
run: yarn

- name: Update chains
run: npm run update
env:
CI: true

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
207 changes: 206 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,14 @@
"type": "git",
"url": "https://github.com/ezstaking/app-registry"
},
"private": true
"type": "module",
"private": true,
"scripts": {
"postinstall": "npm remove chain-registry 2>&1 && npm add chain-registry 2>&1",
"update": "NODE_OPTIONS='--experimental-specifier-resolution=node --loader ts-node/esm --experimental-modules' node scripts/chain-update.mjs"
},
"devDependencies": {
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
}
}
Loading

0 comments on commit 7abdff7

Please sign in to comment.