Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/publish-orders.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: publish-orders

on:
workflow_dispatch:
inputs:
environment:
description: 'Target 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 address to publish orders for'
required: true
type: string

jobs:
publish-order:
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
working-directory: deployment-dapp
run: npm ci

# TODO: Migrate to a github workflow using vars instead of app-address files
- name: Create app address file
working-directory: deployment-dapp
run: echo "${{ github.event.inputs.app_address }}" > .app-address


# TODO: Check WEB3MAIL_APP_OWNER_PRIVATEKEY is the owner of the app address set as input
- name: Execute order action
working-directory: deployment-dapp
env:
WALLET_PRIVATE_KEY: ${{ secrets.WEB3MAIL_APP_OWNER_PRIVATEKEY }}
PRICE: ${{ vars.SELL_ORDER_PRICE }}
VOLUME: ${{ vars.SELL_ORDER_VOLUME }}
RPC_URL: ${{ secrets.RPC_URL }}
run: npm run publish-sell-order