Injective list - Generate data #99624
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: Injective list - Generate data | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "*/15 * * * *" | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| generate: | |
| if: ${{ github.event.head_commit == null || !contains(github.event.head_commit.message, 'generate json files') }} | |
| name: "Regenerate JSON files" | |
| runs-on: blacksmith-8vcpu-ubuntu-2204 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: write | |
| defaults: | |
| run: | |
| working-directory: src | |
| env: | |
| CLOUD_FLARE_API_KEY: ${{ secrets.CLOUD_FLARE_API_KEY }} | |
| CLOUD_FLARE_ACCOUNT_ID: ${{ secrets.CLOUD_FLARE_ACCOUNT_ID }} | |
| CLOUD_FLARE_ACCOUNT_HASH: ${{ secrets.CLOUD_FLARE_ACCOUNT_HASH }} | |
| ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }} | |
| ALCHEMY_SEPOLIA_KEY: ${{ secrets.ALCHEMY_SEPOLIA_KEY }} | |
| MAINNET_FEE_PAYER: ${{ secrets.MAINNET_FEE_PAYER }} | |
| TESTNET_FEE_PAYER: ${{ secrets.TESTNET_FEE_PAYER }} | |
| DEVNET_FEE_PAYER: ${{ secrets.DEVNET_FEE_PAYER }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| ref: master | |
| token: "${{ secrets.GH_TOKEN }}" | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.18.1 | |
| - name: Setup Node.js with cache | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "pnpm" | |
| cache-dependency-path: src/pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm i | |
| - name: Generate tokens | |
| if: ${{ !contains(github.event.head_commit.message, 'fast deploy') }} | |
| run: pnpm run generate:tokens | |
| - name: Generate validators | |
| if: ${{ !contains(github.event.head_commit.message, 'fast deploy') }} | |
| run: pnpm run generate:validators | |
| - name: Generate market slugs | |
| if: ${{ !contains(github.event.head_commit.message, 'fast deploy') }} | |
| run: pnpm run generate:slugs | |
| - name: Generate wasm messages | |
| if: ${{ !contains(github.event.head_commit.message, 'fast deploy') }} | |
| run: pnpm run generate:wasm | |
| - name: Generate verified denoms | |
| if: ${{ !contains(github.event.head_commit.message, 'fast deploy') }} | |
| run: pnpm run generate:verifiedDenoms | |
| - name: Generate restriction list | |
| if: ${{ !contains(github.event.head_commit.message, 'fast deploy') }} | |
| run: pnpm run generate:restriction | |
| - name: Generate swap routes | |
| if: ${{ !contains(github.event.head_commit.message, 'fast deploy') }} | |
| run: pnpm run generate:swap:routes | |
| - name: Generate Evm tokens | |
| if: ${{ !contains(github.event.head_commit.message, 'fast deploy') }} | |
| run: pnpm run generate:tokens:evm | |
| - name: Generate configs | |
| run: pnpm run generate:configs | |
| - name: Commit generated files | |
| working-directory: . | |
| run: | | |
| [ -z "$(git config user.name)" ] && git config --global user.name "GitHub Actions" | |
| [ -z "$(git config user.email)" ] && git config --global user.email "[email protected]" | |
| git add . | |
| # Check if there are any changes to commit | |
| if [ -z "$(git status --porcelain)" ]; then | |
| echo "No changes to commit" | |
| exit 0 | |
| fi | |
| if [[ "${{ contains(github.event.head_commit.message, 'skip deploy') }}" == "true" || "${{ github.event_name != 'push' }}" == "true" ]]; then | |
| git commit -m "chore: generate json files - skip deploy" --no-verify | |
| else | |
| git commit -m "chore: generate json files" --no-verify | |
| fi | |
| git push origin HEAD:master | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| deployAws: | |
| if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && !contains(github.event.head_commit.message, 'skip deploy')) }} | |
| name: "Deploy AWS" | |
| needs: generate | |
| uses: ./.github/workflows/upload.yaml | |
| secrets: inherit | |
| deployAwsStaging: | |
| if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && !contains(github.event.head_commit.message, 'skip deploy')) }} | |
| name: "Deploy AWS Staging" | |
| needs: generate | |
| uses: ./.github/workflows/upload-staging.yaml | |
| secrets: inherit |