ソースを参照

fix: missing workspace name input param

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

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

@@ -16,6 +16,7 @@ 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

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

@@ -16,6 +16,7 @@ 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

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

@@ -16,6 +16,7 @@ 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
 

+ 15 - 0
.github/workflows/common-docker-image.yml

@@ -9,6 +9,9 @@ on:
       package_path:
         required: true
         type: string
+      workspace_name:
+        required: true
+        type: string
     secrets:
       DOCKER_USERNAME:
         required: true
@@ -30,6 +33,14 @@ jobs:
       with:
         python-version: '3.11'
 
+    - name: Cache build
+      id: cache-build
+      uses: actions/cache@v3
+      with:
+        path: |
+          packages/**/dist
+        key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
+
     - name: Set up Node
       uses: actions/setup-node@v3
       with:
@@ -39,6 +50,10 @@ jobs:
     - name: Install dependencies
       run: yarn install --immutable
 
+    - name: Build
+      if: steps.cache-build.outputs.cache-hit != 'true'
+      run: yarn workspace ${{ inputs.workspace_name }} build
+
     - name: Login to Docker Hub
       uses: docker/login-action@v2
       with:

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

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

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

@@ -16,6 +16,7 @@ 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
 

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

@@ -16,6 +16,7 @@ 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
 

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

@@ -16,6 +16,7 @@ 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

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

@@ -16,6 +16,7 @@ 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
 

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

@@ -16,6 +16,7 @@ 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