Skip to content

enable dynamic switch between testnet and mainnet #1

enable dynamic switch between testnet and mainnet

enable dynamic switch between testnet and mainnet #1

Workflow file for this run

name: Portal Bridge [Preview/Testnet] feature branch
on:
pull_request:
jobs:
branch-sha:
name: Compute Branch Sha
runs-on: ubuntu-latest
concurrency:
group: ${{ github.ref }}-preview-sha
outputs:
value: ${{ steps.set-version.outputs._BRANCH_NAME_SHA }}
steps:
- name: Set Version
id: set-version
run: echo "_BRANCH_NAME_SHA=$(echo ${{ github.event.pull_request.head.ref }} | sha256sum | cut -c -10)" >> "${GITHUB_OUTPUT}"
build:
name: "Build Preview/Testnet"
uses: ./.github/workflows/build.yml
with:
name: preview
separator: P
advanced-tools-branch: advanced-tools
environment: Cloudflare-Preview
public-url: "/${{ needs.branch-sha.outputs.value }}"
wac-url: "https://wac.gfx.xyz"
project-branch: ${{ github.event.pull_request.head.ref }}
app-domain: preview.portalbridge.com
secrets: inherit
needs:
- branch-sha
deploy:
name: "Deploy Preview"
needs:
- build
- branch-sha
runs-on: "ubuntu-latest"
concurrency:
group: ${{ github.ref }}-deploy-preview
cancel-in-progress: true
steps:
- name: Deploy Info
run: |
echo "Branch SHA: ${{ needs.branch-sha.outputs.value }}" >> ${GITHUB_STEP_SUMMARY}
echo "The preview URL is: https://preview.portalbridge.com/${{ needs.branch-sha.outputs.value }}/" >> ${GITHUB_STEP_SUMMARY}
echo "The testnet URL is: https://testnet.portalbridge.com/${{ needs.branch-sha.outputs.value }}/" >> ${GITHUB_STEP_SUMMARY}