This repository was archived by the owner on Sep 8, 2025. It is now read-only.
feat: expansion local storage (#1539) #991
Workflow file for this run
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: docker_publish | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| - "release/v1.x" | |
| tags: | |
| - "*" | |
| workflow_dispatch: | |
| jobs: | |
| lint_test: | |
| uses: babylonlabs-io/.github/.github/workflows/reusable_node_lint_test.yml@v0.3.0 | |
| with: | |
| run-build: true | |
| run-unit-tests: true | |
| s3_publish: | |
| needs: [lint_test] | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| environment: | |
| [phase-2-devnet, testnet, mainnet, staging, bsn-devnet, edge-devnet] | |
| environment: ${{ matrix.environment }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.2.0 | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build project | |
| run: npm run build | |
| env: | |
| NODE_OPTIONS: "--max-old-space-size=8192" # 8GB node memory limit | |
| NEXT_PUBLIC_MEMPOOL_API: ${{ vars.NEXT_PUBLIC_MEMPOOL_API }} | |
| NEXT_PUBLIC_API_URL: ${{ vars.NEXT_PUBLIC_API_URL }} | |
| NEXT_PUBLIC_NETWORK: ${{ vars.NEXT_PUBLIC_NETWORK }} | |
| NEXT_PUBLIC_DISPLAY_TESTING_MESSAGES: ${{ vars.NEXT_PUBLIC_DISPLAY_TESTING_MESSAGES }} | |
| NEXT_PUBLIC_SENTRY_DSN: ${{ vars.NEXT_PUBLIC_SENTRY_DSN }} | |
| NEXT_PUBLIC_FIXED_STAKING_TERM: ${{ vars.NEXT_PUBLIC_FIXED_STAKING_TERM }} | |
| NEXT_PUBLIC_COMMIT_HASH: ${{ github.sha }} | |
| NEXT_PUBLIC_CANONICAL: ${{ vars.NEXT_PUBLIC_CANONICAL }} | |
| NEXT_PUBLIC_BBN_GAS_PRICE: ${{ vars.NEXT_PUBLIC_BBN_GAS_PRICE }} | |
| NEXT_PUBLIC_SIDECAR_API_URL: ${{ vars.NEXT_PUBLIC_SIDECAR_API_URL }} | |
| NEXT_PUBLIC_BABYLON_EXPLORER: ${{ vars.NEXT_PUBLIC_BABYLON_EXPLORER }} | |
| NEXT_PUBLIC_REPLAYS_RATE: ${{ vars.NEXT_PUBLIC_REPLAYS_RATE }} | |
| NEXT_PUBLIC_STAKING_DISABLED: ${{ vars.NEXT_PUBLIC_STAKING_DISABLED}} | |
| NEXT_PUBLIC_DISABLED_WALLETS: ${{ vars.NEXT_PUBLIC_DISABLED_WALLETS }} | |
| NEXT_PUBLIC_BABY_LCD_URL: ${{ vars.NEXT_PUBLIC_BABY_LCD_URL }} | |
| NEXT_PUBLIC_BABY_RPC_URL: ${{ vars.NEXT_PUBLIC_BABY_RPC_URL }} | |
| S3_PUBLIC_BUCKET: ${{ vars.S3_PUBLIC_BUCKET }} | |
| SENTRY_ORG: ${{ vars.SENTRY_ORG }} | |
| GA4_MEASUREMENT_ID: ${{ vars.GA4_MEASUREMENT_ID }} | |
| SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| SENTRY_URL: ${{ vars.SENTRY_URL }} | |
| SENTRY_RELEASE: ${{ github.sha }} | |
| SENTRY_DIST: ${{ github.run_id }} | |
| SENTRY_ENVIRONMENT: ${{ matrix.environment }} | |
| NEXT_PUBLIC_RELEASE_ID: ${{ github.sha }} | |
| NEXT_PUBLIC_DIST_ID: ${{ github.run_id }} | |
| NEXT_PUBLIC_SENTRY_ENVIRONMENT: ${{ matrix.environment }} | |
| # Feature Flags | |
| NEXT_PUBLIC_FF_ENABLE_LEDGER: ${{ vars.NEXT_PUBLIC_FF_ENABLE_LEDGER }} | |
| NEXT_PUBLIC_FF_PHASE_3: ${{ vars.NEXT_PUBLIC_FF_PHASE_3 }} | |
| NEXT_PUBLIC_FF_BABYSTAKING: ${{ vars.NEXT_PUBLIC_FF_BABYSTAKING }} | |
| - name: Generate sha256sum checksum | |
| run: | | |
| cd out | |
| FILES_CHECKSUM_PATH="/tmp/simple-staking-${{ matrix.environment }}-${{ github.sha }}-files-checksum.txt" | |
| GLOBAL_CHECKSUM_PATH="/tmp/simple-staking-${{ matrix.environment }}-${{ github.sha }}-global-checksum.txt" | |
| find . -type f -exec sha256sum {} \; | sort > $FILES_CHECKSUM_PATH # sort is for make sure the order on different OS is the same | |
| sha256sum $FILES_CHECKSUM_PATH | cut -d' ' -f1 > $GLOBAL_CHECKSUM_PATH # cut is for remove the filename from the output | |
| - name: Archive output | |
| run: tar -czvf /tmp/simple-staking-${{ matrix.environment }}-${{ github.sha }}.tar.gz -C out . | |
| - name: Upload to S3 with commit sha | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_REGION: ${{ vars.AWS_S3_REGION }} | |
| run: | | |
| aws s3 cp /tmp/simple-staking-${{ matrix.environment }}-${{ github.sha }}.tar.gz s3://${{ vars.S3_PUBLIC_BUCKET }}/simple-staking/${{ matrix.environment }}/${{ github.sha }}.tar.gz | |
| aws s3 cp /tmp/simple-staking-${{ matrix.environment }}-${{ github.sha }}-files-checksum.txt s3://${{ vars.S3_CHECKSUM_BUCKET }}/simple-staking/${{ matrix.environment }}/${{ github.sha }}-files-checksum.txt | |
| aws s3 cp /tmp/simple-staking-${{ matrix.environment }}-${{ github.sha }}-global-checksum.txt s3://${{ vars.S3_CHECKSUM_BUCKET }}/simple-staking/${{ matrix.environment }}/${{ github.sha }}-global-checksum.txt | |
| - name: Upload to S3 with Git Tag | |
| if: startsWith(github.ref, 'refs/tags/') | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_REGION: ${{ vars.AWS_S3_REGION }} | |
| run: | | |
| aws s3 cp /tmp/simple-staking-${{ matrix.environment }}-${{ github.sha }}.tar.gz s3://${{ vars.S3_PUBLIC_BUCKET }}/simple-staking/${{ matrix.environment }}/${{ github.ref_name }}.tar.gz | |
| aws s3 cp /tmp/simple-staking-${{ matrix.environment }}-${{ github.sha }}-files-checksum.txt s3://${{ vars.S3_CHECKSUM_BUCKET }}/simple-staking/${{ matrix.environment }}/${{ github.ref_name }}-files-checksum.txt | |
| aws s3 cp /tmp/simple-staking-${{ matrix.environment }}-${{ github.sha }}-global-checksum.txt s3://${{ vars.S3_CHECKSUM_BUCKET }}/simple-staking/${{ matrix.environment }}/${{ github.ref_name }}-global-checksum.txt |