ソースを参照

fix: strip workflows of bundling

Karol Sójko 1 年間 前
コミット
d798864caf

+ 0 - 1
.github/workflows/analytics.yml

@@ -16,7 +16,6 @@ jobs:
     uses: standardnotes/server/.github/workflows/common-server-application.yml@main
     with:
       service_name: analytics
-      workspace_name: "@standardnotes/analytics"
       deploy_web: false
       package_path: packages/analytics
     secrets: inherit

+ 0 - 1
.github/workflows/api-gateway.yml

@@ -16,7 +16,6 @@ jobs:
     uses: standardnotes/server/.github/workflows/common-server-application.yml@main
     with:
       service_name: api-gateway
-      workspace_name: "@standardnotes/api-gateway"
       deploy_worker: false
       package_path: packages/api-gateway
     secrets: inherit

+ 0 - 1
.github/workflows/auth.yml

@@ -16,7 +16,6 @@ jobs:
     uses: standardnotes/server/.github/workflows/common-server-application.yml@main
     with:
       service_name: auth
-      workspace_name: "@standardnotes/auth-server"
       package_path: packages/auth
     secrets: inherit
 

+ 2 - 26
.github/workflows/common-docker-image.yml

@@ -9,9 +9,6 @@ on:
       package_path:
         required: true
         type: string
-      workspace_name:
-        required: true
-        type: string
     secrets:
       DOCKER_USERNAME:
         required: true
@@ -33,19 +30,6 @@ jobs:
       with:
         python-version: '3.11'
 
-    - name: Create Bundle Dir
-      id: bundle-dir
-      run: echo "temp_dir=$(mktemp -d -t ${{ inputs.service_name }}-${{ github.sha }}-XXXXXXX)" >> $GITHUB_OUTPUT
-
-    - name: Cache build
-      id: cache-build
-      uses: actions/cache@v3
-      with:
-        path: |
-          packages/**/dist
-          ${{ steps.bundle-dir.outputs.temp_dir }}
-        key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
-
     - name: Set up Node
       uses: actions/setup-node@v3
       with:
@@ -55,14 +39,6 @@ jobs:
     - name: Install dependencies
       run: yarn install --immutable
 
-    - name: Build
-      if: steps.cache-build.outputs.cache-hit != 'true'
-      run: yarn build ${{ inputs.package_path }}
-
-    - name: Bundle
-      if: steps.cache-build.outputs.cache-hit != 'true'
-      run: yarn workspace ${{ inputs.workspace_name }} bundle --no-compress --output-directory ${{ steps.bundle-dir.outputs.temp_dir }}
-
     - name: Login to Docker Hub
       uses: docker/login-action@v2
       with:
@@ -93,8 +69,8 @@ jobs:
       uses: docker/build-push-action@v4
       with:
         builder: ${{ steps.buildx.outputs.name }}
-        context: ${{ steps.bundle-dir.outputs.temp_dir }}
-        file: ${{ steps.bundle-dir.outputs.temp_dir }}/${{ inputs.package_path }}/Dockerfile
+        context: .
+        file: ${{ inputs.package_path }}/Dockerfile
         platforms: linux/amd64,linux/arm64
         push: true
         tags: |

+ 0 - 4
.github/workflows/common-server-application.yml

@@ -6,9 +6,6 @@ on:
       service_name:
         required: true
         type: string
-      workspace_name:
-        required: true
-        type: string
       deploy_web:
         required: false
         default: true
@@ -39,7 +36,6 @@ jobs:
     with:
       service_name: ${{ inputs.service_name }}
       package_path: ${{ inputs.package_path }}
-      workspace_name: ${{ inputs.workspace_name }}
     secrets: inherit
 
   deploy-web:

+ 0 - 1
.github/workflows/files.yml

@@ -16,7 +16,6 @@ jobs:
     uses: standardnotes/server/.github/workflows/common-server-application.yml@main
     with:
       service_name: files
-      workspace_name: "@standardnotes/files-server"
       package_path: packages/files
     secrets: inherit
 

+ 0 - 1
.github/workflows/revisions.yml

@@ -16,7 +16,6 @@ jobs:
     uses: standardnotes/server/.github/workflows/common-server-application.yml@main
     with:
       service_name: revisions
-      workspace_name: "@standardnotes/revisions-server"
       package_path: packages/revisions
     secrets: inherit
 

+ 0 - 1
.github/workflows/scheduler.yml

@@ -16,7 +16,6 @@ jobs:
     uses: standardnotes/server/.github/workflows/common-server-application.yml@main
     with:
       service_name: scheduler
-      workspace_name: "@standardnotes/scheduler-server"
       deploy_web: false
       package_path: packages/scheduler
     secrets: inherit

+ 0 - 1
.github/workflows/syncing-server.yml

@@ -16,7 +16,6 @@ jobs:
     uses: standardnotes/server/.github/workflows/common-server-application.yml@main
     with:
       service_name: syncing-server-js
-      workspace_name: "@standardnotes/syncing-server"
       package_path: packages/syncing-server
     secrets: inherit
 

+ 0 - 1
.github/workflows/websockets.yml

@@ -16,7 +16,6 @@ jobs:
     uses: standardnotes/server/.github/workflows/common-server-application.yml@main
     with:
       service_name: websockets
-      workspace_name: "@standardnotes/websockets-server"
       package_path: packages/websockets
     secrets: inherit
 

+ 2 - 2
package.json

@@ -20,8 +20,8 @@
     "release": "lerna version --conventional-graduate --conventional-commits --yes -m \"chore(release): publish new version\"",
     "publish": "lerna publish from-git --yes --no-verify-access --loglevel verbose",
     "postversion": "./scripts/push-tags-one-by-one.sh",
-    "e2e": "yarn build packages/home-server && PORT=3123 yarn workspace @standardnotes/home-server start",
-    "start": "yarn build packages/home-server && yarn workspace @standardnotes/home-server start"
+    "e2e": "yarn workspace @standardnotes/home-server run build && PORT=3123 yarn workspace @standardnotes/home-server start",
+    "start": "yarn workspace @standardnotes/home-server run build && yarn workspace @standardnotes/home-server start"
   },
   "devDependencies": {
     "@commitlint/cli": "^17.0.2",