Skip to content

Assign Owner

Assign Owner #19

Workflow file for this run

name: Assign Owner
on:
workflow_dispatch:
inputs:
controller_owner:
description: 'Controller Canister Owner'
required: true
type: string
controller_canister_id:
description: 'Controller Canister Id'
required: true
type: string
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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.19.0'
- 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: Update controller canister owner to new owner
id: provision
run: scripts/update_controller_owner.sh
env:
IC_NETWORK: ic
CONTROLLER_OWNER: ${{ inputs.controller_owner }}
CONTROLLER_CANISTER_ID: ${{ inputs.controller_canister_id }}
- name: Debug URL
run: echo https://allocatecanistertoowner-4gbndkvjta-uc.a.run.app?apiKey=${{ secrets.FB_API_KEY }}&owner=${{ inputs.controller_owner }}&canisterId=${{ inputs.controller_canister_id }}
- name: Call Firebase Function /allocatecanistertoowner and assert HTTP status 200
uses: fjogeleit/http-request-action@v1
with:
url: https://allocatecanistertoowner-4gbndkvjta-uc.a.run.app?apiKey=${{ secrets.FB_API_KEY }}&owner=${{ inputs.controller_owner }}&canisterId=${{ inputs.controller_canister_id }}
method: 'GET'