Skip to content

Commit

Permalink
Add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
oktapodia committed Aug 29, 2024
1 parent dae8a11 commit 8d3ab85
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/all-tokens.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Add all.json containing all tokens on PR Merge

on:
push:
# pull_request:
# types: [closed]

jobs:
add-file:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install peerdeps
run: npm install -g install-peerdeps ts-node

- name: Install dependencies
run: yarn install

- name: Install peer dependencies
run: install-peerdeps -Y @lifi/sdk

- name: Run generateAll.ts script
run: ts-node generateAll.ts

- name: Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add -f tokens/all.json
git commit -m "Update tokens/all.json on PR merge"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 8d3ab85

Please sign in to comment.