Skip to content

Deploy OS

Deploy OS #28

Workflow file for this run

name: Deploy OS
on:
workflow_dispatch:
inputs:
network:
description: "Network to deploy to"
required: true
type: string
kernel_address:
description: "Kernel address"
required: false
type: string
deploy_os:
description: "Deploy OS"
required: false
type: boolean
contracts:
description: "Contracts to deploy (e.g. splitter, validator-staking)"
required: false
type: string
jobs:
build_contracts:
if: contains('["crnbarr93", "SlayerAnsh", "joemonem", "DimitrijeDragasevic", "cowboy0015"]', github.actor)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Contracts
run: |
sudo make version-map
make build
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: contracts
path: ./artifacts/
if-no-files-found: error
build_deploy_script:
if: contains('["crnbarr93", "SlayerAnsh", "joemonem", "DimitrijeDragasevic", "cowboy0015"]', github.actor)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Deploy Script
run: cargo build -p andromeda-deploy --release
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: deploy
path: ./target/release/andromeda-deploy
if-no-files-found: error
deploy:
runs-on: ubuntu-latest
needs: [build_contracts, build_deploy_script]
env:
DEPLOYMENT_CHAIN: ${{ inputs.network }}
DEPLOYMENT_KERNEL_ADDRESS: ${{ inputs.kernel_address }}
DEPLOY_OS: ${{ inputs.deploy_os }}
DEPLOY_CONTRACTS: ${{ inputs.contracts }}
SLACK_WEBHOOK_URL: "${{ secrets.DEPLOY_SLACK_WEBHOOK_URL }}"
TEST_MNEMONIC: "${{ secrets.DEPLOY_TEST_MNEMONIC }}"
RUST_LOG: info
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.76.0
components: rustfmt, clippy
profile: minimal
override: true
- name: Download Contracts
uses: actions/download-artifact@v3
with:
name: contracts
path: "./artifacts"
- name: Download Deploy Script
uses: actions/download-artifact@v3
with:
name: deploy
path: "./"
- name: Deploy
run: |
chmod +x ./andromeda-deploy
./andromeda-deploy
- name: Upload Deployment Report
uses: actions/upload-artifact@v3
with:
name: deployment-report
path: ./deployment-reports/
if-no-files-found: error