|
@@ -9,6 +9,9 @@ on:
|
|
package_path:
|
|
package_path:
|
|
required: true
|
|
required: true
|
|
type: string
|
|
type: string
|
|
|
|
+ workspace_name:
|
|
|
|
+ required: true
|
|
|
|
+ type: string
|
|
secrets:
|
|
secrets:
|
|
DOCKER_USERNAME:
|
|
DOCKER_USERNAME:
|
|
required: true
|
|
required: true
|
|
@@ -30,6 +33,14 @@ jobs:
|
|
with:
|
|
with:
|
|
python-version: '3.11'
|
|
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
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v3
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
with:
|
|
@@ -39,6 +50,10 @@ jobs:
|
|
- name: Install dependencies
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
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
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v2
|
|
uses: docker/login-action@v2
|
|
with:
|
|
with:
|