Skip to content

Commit

Permalink
argument_file
Browse files Browse the repository at this point in the history
  • Loading branch information
dskloetd committed Sep 26, 2024
1 parent 324404a commit 93ca92b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/deploy-to-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ jobs:
CANISTER_NAME="nns-dapp"
# Note: inputs.mode is set if this workflow is run manually, using `workflow_dispatch` defined above.
# If the workflow is triggered in another way, the inputs are not defined so we need to specify a default again.
scripts/nns-dapp/deploy-in-chunks --assets "out/assets.tar.xz" --network "$DFX_NETWORK" --mode "${{ inputs.mode || 'upgrade' }}"
scripts/nns-dapp/deploy-in-chunks \
--assets "out/assets.tar.xz" \
--network "$DFX_NETWORK" \
--mode "${{ inputs.mode || 'upgrade' }}" \
--argument_file "out/nns-dapp-arg-${DFX_NETWORK}.did"
- name: Deploy sns_aggregator
if: (inputs.canisters == 'all') || (inputs.canisters == 'sns_aggregator') || ( github.event_name != 'workflow_dispatch' )
run: |
Expand Down
3 changes: 2 additions & 1 deletion scripts/nns-dapp/deploy-in-chunks
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ clap.define short=n long=network desc="The dfx network to use" variable=DFX_NETW
clap.define short=i long=identity desc="The dfx identity to use" variable=DFX_IDENTITY default="${DFX_IDENTITY:-$(dfx identity whoami)}"
clap.define long=mode desc="The dfx install mode" variable=DFX_MODE default="upgrade"
clap.define short=a long=assets desc="The assets.tar.xz to split" variable=ORIGINAL_ASSETS_TAR_XZ default="out/assets.tar.xz"
clap.define long=argument_file desc="The .did file with the canister argument" variable=ARGUMENT_FILE default="out/nns-dapp-arg-local.did"
# Source the output file ----------------------------------------------------------
source "$(clap.build)"

Expand All @@ -17,7 +18,7 @@ CANISTER_NAME="nns-dapp"

"$SOURCE_DIR/nns-dapp/split-assets" --assets "$ORIGINAL_ASSETS_TAR_XZ"

ARGUMENT="$(cat "nns-dapp-arg-${DFX_NETWORK}.did")"
ARGUMENT="$(cat "$ARGUMENT_FILE")"

# There have been issues with the uploading of assets causing
# "heap out of bounds" so we output logs to help debug when it happens
Expand Down

0 comments on commit 93ca92b

Please sign in to comment.