02-push-dapp-secret.yml #2
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: 02-push-dapp-secret.yml | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| description: 'Deployment environment' | |
| required: true | |
| type: choice | |
| options: | |
| # dev environments | |
| - bellecour-dev | |
| - arbitrum-sepolia-dev | |
| # prod environments | |
| - bellecour-prod | |
| - arbitrum-sepolia-prod | |
| - arbitrum-prod | |
| app_address: | |
| description: 'App contract address' | |
| required: true | |
| type: string | |
| jobs: | |
| push-secret: | |
| runs-on: ubuntu-latest | |
| environment: ${{ inputs.environment }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.19.0' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: | | |
| npm ci | |
| cd deployment-dapp | |
| npm ci | |
| - name: Create app address file | |
| run: | | |
| echo "${{ inputs.app_address }}" > deployment-dapp/.app-address | |
| echo "Using app address: ${{ inputs.app_address }}" | |
| - name: Push dapp secret | |
| env: | |
| WALLET_PRIVATE_KEY: ${{ secrets.WEB3TELEGRAM_APP_OWNER_PRIVATEKEY }} | |
| TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
| RPC_URL: ${{ secrets.RPC_URL }} | |
| run: | | |
| cd deployment-dapp | |
| npm run push-dapp-secret |