From 1452fa7f80c32786157ad5562edcf5207cd9f922 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 20 Jun 2023 21:52:14 +0200 Subject: [PATCH] Deploy to app (#2728) # Motivation The action that deploys to an app subnet works but is slow and not ergonomic. # Changes - Use a larger runner to build faster - Improve the markdown, although it would be nice it it were not all bold. # Tests See the CI runs. [A sample run:](https://github.com/dfinity/nns-dapp/actions/runs/5326744006) ![Screenshot from 2023-06-20 21-49-13](https://github.com/dfinity/nns-dapp/assets/5982633/4a29b6ca-4c1b-489a-8362-eec14b36f190) --------- Co-authored-by: Max Murphy-Skvorzov Co-authored-by: David Dal Busco --- .github/workflows/deploy-to-app.yaml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-to-app.yaml b/.github/workflows/deploy-to-app.yaml index 805be57bb9b..05bc4415dc9 100644 --- a/.github/workflows/deploy-to-app.yaml +++ b/.github/workflows/deploy-to-app.yaml @@ -31,7 +31,7 @@ concurrency: cancel-in-progress: true jobs: deploy-app: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest-m timeout-minutes: 60 env: NNS_DAPP_APP_SUBNET_CANISTER_ID: "xnjld-hqaaa-aaaal-qb56q-cai" @@ -103,12 +103,17 @@ jobs: dfx canister install --mode "${{ inputs.mode || 'upgrade' }}" --yes --network "$DFX_NETWORK" "$CANISTER_NAME" --wasm out/sns_aggregator.wasm - name: Canister info run: | + # How to add a github summary: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-adding-a-job-summary + set -x for canister in nns-dapp sns_aggregator ; do - echo "========================================" - printf "== % 34s ==\n" "$canister" - set -x - dfx-canister-url --network "$DFX_NETWORK" "$canister" - dfx canister info --network "$DFX_NETWORK" "$canister" - dfx canister metadata --network "$DFX_NETWORK" "$canister" git_commit_id - set +x + { + printf "## %s\n\n" "$canister" + printf "URL: " + dfx-canister-url --network "$DFX_NETWORK" "$canister" + printf "Commit: " + dfx canister metadata --network "$DFX_NETWORK" "$canister" git_commit_id || printf "NONE" + echo + dfx canister info --network "$DFX_NETWORK" "$canister" + echo + } >> $GITHUB_STEP_SUMMARY || true done