diff --git a/.github/workflows/analytics.yml b/.github/workflows/analytics.yml index 2af24f279..57caa4fd0 100644 --- a/.github/workflows/analytics.yml +++ b/.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 diff --git a/.github/workflows/api-gateway.yml b/.github/workflows/api-gateway.yml index 4d38df960..1a7af9db3 100644 --- a/.github/workflows/api-gateway.yml +++ b/.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 diff --git a/.github/workflows/auth.yml b/.github/workflows/auth.yml index 5efdaf3ba..034ee59cd 100644 --- a/.github/workflows/auth.yml +++ b/.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 diff --git a/.github/workflows/common-docker-image.yml b/.github/workflows/common-docker-image.yml index 1b7e885fc..6aa8a9665 100644 --- a/.github/workflows/common-docker-image.yml +++ b/.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: diff --git a/.github/workflows/common-server-application.yml b/.github/workflows/common-server-application.yml index 466b25268..5aede9c5f 100644 --- a/.github/workflows/common-server-application.yml +++ b/.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: diff --git a/.github/workflows/files.yml b/.github/workflows/files.yml index 1e0259994..47b9f29c7 100644 --- a/.github/workflows/files.yml +++ b/.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 diff --git a/.github/workflows/revisions.yml b/.github/workflows/revisions.yml index f039475cd..6cdf974e4 100644 --- a/.github/workflows/revisions.yml +++ b/.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 diff --git a/.github/workflows/scheduler.yml b/.github/workflows/scheduler.yml index b4734dcf9..434d0aafd 100644 --- a/.github/workflows/scheduler.yml +++ b/.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 diff --git a/.github/workflows/syncing-server.yml b/.github/workflows/syncing-server.yml index 82b34baac..77f7c9bd1 100644 --- a/.github/workflows/syncing-server.yml +++ b/.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 diff --git a/.github/workflows/websockets.yml b/.github/workflows/websockets.yml index 589c43b08..6e1a11e33 100644 --- a/.github/workflows/websockets.yml +++ b/.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