Merge pull request #30 from arcmindai/dev #60
This file contains 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: Dev | |
on: | |
workflow_dispatch: | |
push: | |
branches: ['dev', 'main'] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.ARCMIND_CI_TOKEN }} | |
submodules: true | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install Rust toolchain | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
rustup target add wasm32-unknown-unknown | |
- name: Install DFX | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: '0.15.2' | |
- name: Add DFX identity and wallets | |
run: ./scripts/add-ic-identity.sh | |
env: | |
DFX_IDENTITY: ${{ secrets.DFX_IDENTITY_PROD }} | |
DFX_WALLETS: ${{ secrets.DFX_WALLETS_PROD }} | |
- name: Fetch git submodule arcmindvector | |
run: git submodule update --init --recursive | |
- name: run DFX local replica | |
run: dfx start --clean --background | |
- name: Build and Deploy locally | |
id: provision | |
run: scripts/provision-instance.sh | |
env: | |
IC_NETWORK: local | |
OWNER_PRINCIPAL: ${{ secrets.OWNER_PRINCIPAL }} | |
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
GOOGLE_SEARCH_ENGINE_ID: ${{ secrets.GOOGLE_SEARCH_ENGINE_ID }} | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
BEAMFI_PRINCIPAL: ${{ secrets.BEAMFI_PRINCIPAL }} | |
BILLING_KEY: ${{ secrets.BILLING_KEY }} | |
BATTERY_API_KEY: ${{ secrets.BATTERY_API_KEY }} | |
BATTERY_PRINCIAL: ${{ secrets.BATTERY_PRINCIAL }} | |
- name: Show Controller Principal | |
run: echo ${{ steps.provision.outputs.controller_principal }} |