@@ -137,6 +137,46 @@ jobs:
137137 # downloaded file
138138 path : archive.wasm.gz
139139
140+ docker-build-internet_identity_frontend :
141+ runs-on : ubuntu-latest
142+ needs : docker-build-base
143+ steps :
144+ - uses : actions/checkout@v4
145+
146+ - name : Infer version
147+ id : version
148+ run : |
149+ version="$(./scripts/version)"
150+ echo "Inferred version: '$version'"
151+ echo "version=$version" >> "$GITHUB_OUTPUT"
152+
153+ - name : Set up docker buildx
154+ uses : docker/setup-buildx-action@v3
155+
156+ - name : Build internet_identity_frontend.wasm.gz
157+ uses : docker/build-push-action@v5
158+ with :
159+ context : .
160+ file : Dockerfile
161+ build-args : |
162+ II_VERSION=${{ steps.version.outputs.version }}
163+ II_DEV_CSP=0
164+ cache-from : type=gha,scope=cached-stage
165+ # Exports the artefacts from the final stage
166+ outputs : ./out
167+ target : scratch_internet_identity_frontend
168+
169+ - run : mv out/internet_identity_frontend.wasm.gz internet_identity_frontend.wasm.gz
170+ - run : sha256sum internet_identity_frontend.wasm.gz
171+ - name : " Upload internet_identity_frontend.wasm.gz"
172+ uses : actions/upload-artifact@v4
173+ with :
174+ # name is the name used to display and retrieve the artifact
175+ name : internet_identity_frontend.wasm.gz
176+ # path is the name used as the file to upload and the name of the
177+ # downloaded file
178+ path : internet_identity_frontend.wasm.gz
179+
140180 wasm-size :
141181 runs-on : ubuntu-latest
142182 needs : docker-build-ii
@@ -518,7 +558,7 @@ jobs:
518558 svg='<svg viewBox=\\\"0 0 24 24\\\"><path d=\\\"m14 2.8-2.6 1.8v16.6l2.6-1.4zm-3.3 5.4C1.9 9 2 14.7 2 14.7c0 5.6 8.7 6.5 8.7 6.5v-1.9c-6.3-1-5.5-4.5-5.5-4.5.3-4 5.5-4.3 5.5-4.3Zm4 0v2.1s1.6 0 3 1.2l-1.5.6 5.8 1.4V9l-2 1.1s-1.7-1.7-5.3-1.9z\\\" style=\\\"fill: currentColor;\\\"></path></svg>'
519559 configs=()
520560 for port in ${{ env.openid_providers }}; do
521- configs+=("record { name = \\\"Test OpenID $port\\\"; logo = \\\"$svg\\\"; issuer = \\\"http://localhost:$port\\\"; client_id = \\\"internet_identity\\\"; jwks_uri = \\\"http://localhost:$port/jwks\\\"; auth_uri = \\\"http://localhost:$port/auth\\\"; auth_scope = vec { \\\"openid\\\"; \\\"profile\\\"; \\\"email\\\" }; fedcm_uri = opt \\\"\\\"; }")
561+ configs+=("record { name = \\\"Test OpenID $port\\\"; logo = \\\"$svg\\\"; issuer = \\\"http://localhost:$port\\\"; client_id = \\\"internet_identity\\\"; jwks_uri = \\\"http://localhost:$port/jwks\\\"; auth_uri = \\\"http://localhost:$port/auth\\\"; auth_scope = vec { \\\"openid\\\"; \\\"profile\\\"; \\\"email\\\" }; fedcm_uri = opt \\\"\\\"; email_verification = opt variant { Google }; }")
522562 done
523563 openid_configs="$(IFS='; '; echo "${configs[*]}")"
524564 echo "OPENID_CONFIGS=$openid_configs" >> "$GITHUB_OUTPUT"
@@ -528,7 +568,8 @@ jobs:
528568 # NOTE: dfx install will run the postinstall scripts from dfx.json
529569 dfx canister install internet_identity --wasm internet_identity_test.wasm.gz --argument "(opt record { captcha_config = opt record { max_unsolved_captchas= 50:nat64; captcha_trigger = variant {Static = variant { CaptchaDisabled }}}; related_origins = opt vec { \"https://id.ai\"; \"https://identity.ic0.app\"; \"https://identity.internetcomputer.org\" }; new_flow_origins = opt vec { \"https://id.ai\" }; dummy_auth = opt opt record { prompt_for_index = true }; openid_configs = opt vec { ${{ steps.openid-configs.outputs.OPENID_CONFIGS }} } })"
530570 if [ "${{ matrix.canister == 'split' }}" = "true" ]; then
531- dfx canister install internet_identity_frontend --wasm internet_identity_frontend_test.wasm.gz
571+ II_CANISTER_ID=$(dfx canister id internet_identity)
572+ dfx canister install internet_identity_frontend --wasm internet_identity_frontend_test.wasm.gz --argument "(record { backend_canister_id = principal \"$II_CANISTER_ID\"; backend_origin = \"https://backend.id.ai\"; related_origins = opt vec { \"https://id.ai\"; \"https://identity.ic0.app\"; \"https://identity.internetcomputer.org\" }; dummy_auth = opt opt record { prompt_for_index = true } })"
532573 fi
533574 dfx canister install test_app --wasm demos/test-app/test_app.wasm
534575
@@ -721,7 +762,13 @@ jobs:
721762 # On release tags, a new release is created and the assets are uploaded.
722763 release :
723764 runs-on : ubuntu-latest
724- needs : [docker-build-ii, docker-build-archive, vc_demo_issuer-build]
765+ needs :
766+ [
767+ docker-build-ii,
768+ docker-build-archive,
769+ docker-build-internet_identity_frontend,
770+ vc_demo_issuer-build,
771+ ]
725772
726773 steps :
727774 - uses : actions/checkout@v4
@@ -750,6 +797,12 @@ jobs:
750797 name : archive.wasm.gz
751798 path : .
752799
800+ - name : " Download frontend"
801+ uses : actions/download-artifact@v4
802+ with :
803+ name : internet_identity_frontend.wasm.gz
804+ path : .
805+
753806 - name : " Download issuer"
754807 uses : actions/download-artifact@v4
755808 with :
@@ -815,6 +868,7 @@ jobs:
815868 internet_identity_production.wasm.gz
816869 internet_identity_dev.wasm.gz
817870 internet_identity_test.wasm.gz
871+ internet_identity_frontend.wasm.gz
818872 archive.wasm.gz
819873 vc_demo_issuer.wasm.gz
820874 production_asset : internet_identity_production.wasm.gz
@@ -842,6 +896,7 @@ jobs:
842896 internet_identity_production.wasm.gz.sha256 \
843897 internet_identity_dev.wasm.gz \
844898 internet_identity_test.wasm.gz \
899+ internet_identity_frontend.wasm.gz \
845900 src/internet_identity/internet_identity.did \
846901 archive.wasm.gz \
847902 vc_demo_issuer.wasm.gz
0 commit comments