diff --git a/.github/workflows/dapp-deploy.yml b/.github/workflows/dapp-deploy.yml index ed38a72..85f7e36 100644 --- a/.github/workflows/dapp-deploy.yml +++ b/.github/workflows/dapp-deploy.yml @@ -67,7 +67,7 @@ jobs: sconify-debug: false sconify-prod: true docker-registry: docker.io - sconify-version: '5.9.0-v15' + sconify-version: ${{ vars.SCONIFY_VERSION }} binary: /usr/local/bin/node command: node host-path: | @@ -114,6 +114,7 @@ jobs: CHECKSUM: ${{ needs.sconify.outputs.prod-checksum }} FINGERPRINT: ${{ needs.sconify.outputs.prod-mrenclave }} RPC_URL: ${{ secrets.RPC_URL }} + SCONIFY_VERSION: ${{ vars.SCONIFY_VERSION }} run: | cd deployment-dapp npm run deploy-dapp diff --git a/deployment-dapp/src/deployScript.ts b/deployment-dapp/src/deployScript.ts index aa33c48..8393281 100644 --- a/deployment-dapp/src/deployScript.ts +++ b/deployment-dapp/src/deployScript.ts @@ -9,6 +9,7 @@ const main = async () => { DOCKER_IMAGE_TAG, CHECKSUM, FINGERPRINT, + SCONIFY_VERSION, } = process.env; if (!WALLET_PRIVATE_KEY) @@ -25,6 +26,7 @@ const main = async () => { dockerTag: DOCKER_IMAGE_TAG, checksum: CHECKSUM, fingerprint: FINGERPRINT, + sconifyVersion: SCONIFY_VERSION, }); await saveAppAddress(address); }; diff --git a/deployment-dapp/src/singleFunction/deployApp.ts b/deployment-dapp/src/singleFunction/deployApp.ts index 1a506cf..20f219e 100644 --- a/deployment-dapp/src/singleFunction/deployApp.ts +++ b/deployment-dapp/src/singleFunction/deployApp.ts @@ -13,6 +13,7 @@ export const deployApp = async ({ dockerTag, checksum, fingerprint, + sconifyVersion, }: { iexec: IExec; dockerNamespace?: string; @@ -20,13 +21,16 @@ export const deployApp = async ({ dockerTag: string; checksum?: string; fingerprint?: string; + sconifyVersion: string; }): Promise => { const name = APP_NAME; const type = APP_TYPE; + console.log(`Using SCONIFY version: ${sconifyVersion}`); + const mrenclave = { framework: 'SCONE' as any, // workaround framework not auto capitalized - version: 'v5.9', + version: `v${sconifyVersion.split('.').slice(0, 2).join('.')}`, // extracts "vX.Y" from "X.Y.Z-vN" format (e.g., "5.9.1-v16" → "v5.9") entrypoint: 'node /app/app.js', heapSize: 1073741824, fingerprint,