From 63d7eb712dc4abc2cc6918c55217ce3290410654 Mon Sep 17 00:00:00 2001 From: Gustav-Eikaas <89254170+Gustav-Eikaas@users.noreply.github.com> Date: Thu, 7 Dec 2023 12:15:26 +0100 Subject: [PATCH] ci: update actions (#749) --- .github/workflows/manual-deploy-prod.yml | 15 +++++++++++++-- .github/workflows/manual-deploy.yml | 19 +++++++++++++++---- apps/electricalconsumers/package.json | 4 ++-- apps/heattrace/package.json | 4 ++-- apps/loop/package.json | 4 ++-- apps/mechanicalcompletion/package.json | 4 ++-- apps/piping/package.json | 4 ++-- apps/punch/package.json | 4 ++-- apps/scopechangerequest/package.json | 4 ++-- apps/swcr/package.json | 4 ++-- apps/workorder/package.json | 4 ++-- .../files/package.json__template__ | 4 ++-- 12 files changed, 48 insertions(+), 26 deletions(-) diff --git a/.github/workflows/manual-deploy-prod.yml b/.github/workflows/manual-deploy-prod.yml index 1214d9d29..ffd76016a 100644 --- a/.github/workflows/manual-deploy-prod.yml +++ b/.github/workflows/manual-deploy-prod.yml @@ -3,9 +3,20 @@ name: Manual deploy fusion app PROD on: workflow_dispatch: inputs: - appKey: - type: string + category: + type: choice description: Which app to deploy to production + options: + - handover + - mechanical-completion + - swcr + - electrical-consumers + - heat-trace + - loop + - pipetest + - punch + - scopechangerequest + - workorder permissions: actions: read checks: write diff --git a/.github/workflows/manual-deploy.yml b/.github/workflows/manual-deploy.yml index 730cafe11..7060d81fd 100644 --- a/.github/workflows/manual-deploy.yml +++ b/.github/workflows/manual-deploy.yml @@ -3,9 +3,20 @@ name: Manual deploy fusion app TEST🚀 on: workflow_dispatch: inputs: - appKey: - type: string + category: + type: choice description: Which app to deploy to test + options: + - handover + - mechanical-completion + - swcr + - electrical-consumers + - heat-trace + - loop + - pipetest + - punch + - scopechangerequest + - workorder permissions: actions: read checks: write @@ -35,11 +46,11 @@ jobs: uses: ./.github/actions/pnpm-setup - name: Build monorepo - run: npx turbo run build --filter='${{inputs.appKey}}' + run: npx turbo run build --filter='${{inputs.category}}' - name: 'Deploy affected apps to Fusion CI env' shell: bash env: #Runs out of memory when bundling more apps otherwise even though concurrency is 1 NODE_OPTIONS: '--max_old_space_size=4096' - run: npx turbo run pr:deploy --filter='${{inputs.appKey}}' --concurrency 1 -- --token ${{ steps.get-fusion-token.outputs.token }} + run: npx turbo run pr:deploy --filter='${{inputs.category}}' --concurrency 1 -- --token ${{ steps.get-fusion-token.outputs.token }} diff --git a/apps/electricalconsumers/package.json b/apps/electricalconsumers/package.json index d6e7a6973..309978b07 100644 --- a/apps/electricalconsumers/package.json +++ b/apps/electricalconsumers/package.json @@ -9,8 +9,8 @@ "dev": "fusion-framework-cli app dev", "dev:local": "fusion-framework-cli app dev -c app.config.local.js", "build": "tsc -b -f", - "pr:deploy": "npx ts-node --esm ../../github-action/src/releasePr.ts release", - "fprd:deploy": "npx ts-node --esm ../../github-action/src/releaseMain.ts release" + "pr:deploy": "ts-node --esm ../../github-action/src/releasePr.ts release", + "fprd:deploy": "ts-node --esm ../../github-action/src/releaseMain.ts release" }, "dependencies": { "@cc-components/electricalconsumersapp": "workspace:^", diff --git a/apps/heattrace/package.json b/apps/heattrace/package.json index 7d771691e..10a1653da 100644 --- a/apps/heattrace/package.json +++ b/apps/heattrace/package.json @@ -10,8 +10,8 @@ "dev": "fusion-framework-cli app dev", "dev:local": "fusion-framework-cli app dev -c app.config.local.js", "build": "tsc -b -f", - "pr:deploy": "npx ts-node --esm ../../github-action/src/releasePr.ts release", - "fprd:deploy": "npx ts-node --esm ../../github-action/src/releaseMain.ts release" + "pr:deploy": "ts-node --esm ../../github-action/src/releasePr.ts release", + "fprd:deploy": "ts-node --esm ../../github-action/src/releaseMain.ts release" }, "dependencies": { "@cc-components/heattraceapp": "workspace:^", diff --git a/apps/loop/package.json b/apps/loop/package.json index d4fc1dd4f..9924ddaf9 100644 --- a/apps/loop/package.json +++ b/apps/loop/package.json @@ -8,8 +8,8 @@ "dev": "fusion-framework-cli app dev", "dev:local": "fusion-framework-cli app dev -c app.config.local.js", "build": "tsc -b -f", - "pr:deploy": "npx ts-node --esm ../../github-action/src/releasePr.ts release", - "fprd:deploy": "npx ts-node --esm ../../github-action/src/releaseMain.ts release" + "pr:deploy": "ts-node --esm ../../github-action/src/releasePr.ts release", + "fprd:deploy": "ts-node --esm ../../github-action/src/releaseMain.ts release" }, "dependencies": { "@cc-components/loopapp": "workspace:^", diff --git a/apps/mechanicalcompletion/package.json b/apps/mechanicalcompletion/package.json index 46e4fb736..b91ac9f6e 100644 --- a/apps/mechanicalcompletion/package.json +++ b/apps/mechanicalcompletion/package.json @@ -10,8 +10,8 @@ "dev": "fusion-framework-cli app dev", "dev:local": "fusion-framework-cli app dev -c app.config.local.js", "build": "tsc -b -f", - "pr:deploy": "npx ts-node --esm ../../github-action/src/releasePr.ts release", - "fprd:deploy": "npx ts-node --esm ../../github-action/src/releaseMain.ts release" + "pr:deploy": "ts-node --esm ../../github-action/src/releasePr.ts release", + "fprd:deploy": "ts-node --esm ../../github-action/src/releaseMain.ts release" }, "dependencies": { "@cc-components/mechanicalcompletionapp": "workspace:^", diff --git a/apps/piping/package.json b/apps/piping/package.json index 97924ba6f..32fd9372d 100644 --- a/apps/piping/package.json +++ b/apps/piping/package.json @@ -9,8 +9,8 @@ "dev": "fusion-framework-cli app dev", "dev:local": "fusion-framework-cli app dev -c app.config.local.js", "build": "tsc -b -f", - "pr:deploy": "npx ts-node --esm ../../github-action/src/releasePr.ts release", - "fprd:deploy": "npx ts-node --esm ../../github-action/src/releaseMain.ts release" + "pr:deploy": "ts-node --esm ../../github-action/src/releasePr.ts release", + "fprd:deploy": "ts-node --esm ../../github-action/src/releaseMain.ts release" }, "dependencies": { "@cc-components/pipingapp": "workspace:^", diff --git a/apps/punch/package.json b/apps/punch/package.json index fefaa0346..e07d7f0d1 100644 --- a/apps/punch/package.json +++ b/apps/punch/package.json @@ -8,8 +8,8 @@ "dev": "fusion-framework-cli app dev", "dev:local": "fusion-framework-cli app dev -c app.config.local.js", "build": "tsc -b -f", - "pr:deploy": "npx ts-node --esm ../../github-action/src/releasePr.ts release", - "fprd:deploy": "npx ts-node --esm ../../github-action/src/releaseMain.ts release" + "pr:deploy": "ts-node --esm ../../github-action/src/releasePr.ts release", + "fprd:deploy": "ts-node --esm ../../github-action/src/releaseMain.ts release" }, "dependencies": { "@cc-components/punchapp": "workspace:^", diff --git a/apps/scopechangerequest/package.json b/apps/scopechangerequest/package.json index ee8c1f040..6707d67e6 100644 --- a/apps/scopechangerequest/package.json +++ b/apps/scopechangerequest/package.json @@ -9,8 +9,8 @@ "dev": "fusion-framework-cli app dev", "dev:local": "fusion-framework-cli app dev -c app.config.local.js", "build": "tsc -b -f", - "pr:deploy": "npx ts-node --esm ../../github-action/src/releasePr.ts release", - "fprd:deploy": "npx ts-node --esm ../../github-action/src/releaseMain.ts release" + "pr:deploy": "ts-node --esm ../../github-action/src/releasePr.ts release", + "fprd:deploy": "ts-node --esm ../../github-action/src/releaseMain.ts release" }, "dependencies": { "@cc-components/scopechangerequestapp": "workspace:^", diff --git a/apps/swcr/package.json b/apps/swcr/package.json index 56a3591c7..0ab05b28b 100644 --- a/apps/swcr/package.json +++ b/apps/swcr/package.json @@ -9,8 +9,8 @@ "dev": "fusion-framework-cli app dev", "dev:local": "fusion-framework-cli app dev -c app.config.local.js", "build": "tsc -b -f", - "pr:deploy": "npx ts-node --esm ../../github-action/src/releasePr.ts release", - "fprd:deploy": "npx ts-node --esm ../../github-action/src/releaseMain.ts release" + "pr:deploy": "ts-node --esm ../../github-action/src/releasePr.ts release", + "fprd:deploy": "ts-node --esm ../../github-action/src/releaseMain.ts release" }, "dependencies": { "@cc-components/shared": "workspace:^", diff --git a/apps/workorder/package.json b/apps/workorder/package.json index 6ba9f4f2c..5384d9f1f 100644 --- a/apps/workorder/package.json +++ b/apps/workorder/package.json @@ -7,8 +7,8 @@ "dev": "fusion-framework-cli app dev", "dev:local": "fusion-framework-cli app dev -c app.config.local.js", "build": "tsc -b -f", - "pr:deploy": "npx ts-node --esm ../../github-action/src/releasePr.ts release", - "fprd:deploy": "npx ts-node --esm ../../github-action/src/releaseMain.ts release" + "pr:deploy": "ts-node --esm ../../github-action/src/releasePr.ts release", + "fprd:deploy": "ts-node --esm ../../github-action/src/releaseMain.ts release" }, "dependencies": { "@cc-components/shared": "workspace:^", diff --git a/libs/plugins/src/generators/fusion-app-generator/files/package.json__template__ b/libs/plugins/src/generators/fusion-app-generator/files/package.json__template__ index d03f7ae4b..c7c788eb1 100644 --- a/libs/plugins/src/generators/fusion-app-generator/files/package.json__template__ +++ b/libs/plugins/src/generators/fusion-app-generator/files/package.json__template__ @@ -7,8 +7,8 @@ "scripts": { "dev": "fusion-framework-cli app dev", "build": "tsc -b -f", - "pr:deploy": "npx ts-node --esm ../../github-action/src/releasePr.ts release", - "fprd:deploy": "npx ts-node --esm ../../github-action/src/releaseMain.ts release" + "pr:deploy": "ts-node --esm ../../github-action/src/releasePr.ts release", + "fprd:deploy": "ts-node --esm ../../github-action/src/releaseMain.ts release" }, "dependencies": { "@cc-components/<%= projectName%>app": "workspace:^",