Update swap lists every 60 mins #26746
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update swap lists every 60 mins | |
| on: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: "0 * * * *" | |
| jobs: | |
| run: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: "20.17.0" | |
| cache: "yarn" | |
| cache-dependency-path: swap-tokens-generator/yarn.lock | |
| - run: cd swap-tokens-generator && yarn install --frozen-lockfile && yarn run build | |
| - run: cd swap-tokens-generator && yarn run update:lists | |
| - run: cd swap-tokens-generator && mv dist/lists/*.json ../swaplists | |
| - name: Fetch and update RWA addresses | |
| run: | | |
| curl -sf -A "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36" \ | |
| "https://partners.mewapi.io/o/api/v1/assets/all/addresses" \ | |
| | jq '[.[].addresses[].address]' \ | |
| > configs/filtered-rwa-addresses.json | |
| - uses: EndBug/add-and-commit@v9 | |
| with: | |
| default_author: github_actions | |
| message: "swap list updated" | |
| add: "swaplists/*.json configs/filtered-rwa-addresses.json" |