mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 15:37:33 +00:00
docs turbo, exec turbo build from workflows
This commit is contained in:
17
.github/workflows/build.yml
vendored
17
.github/workflows/build.yml
vendored
@@ -34,6 +34,12 @@ jobs:
|
||||
node_version: "20"
|
||||
buf_version: "latest"
|
||||
|
||||
docs:
|
||||
uses: ./.github/workflows/docs.yml
|
||||
with:
|
||||
node_version: "20"
|
||||
buf_version: "latest"
|
||||
|
||||
version:
|
||||
uses: ./.github/workflows/version.yml
|
||||
with:
|
||||
@@ -121,7 +127,16 @@ jobs:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
needs:
|
||||
[version, core-unit-test, core-integration-test, lint, container, login-container, login-quality, e2e]
|
||||
[
|
||||
version,
|
||||
core-unit-test,
|
||||
core-integration-test,
|
||||
lint,
|
||||
container,
|
||||
login-container,
|
||||
login-quality,
|
||||
e2e,
|
||||
]
|
||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
secrets:
|
||||
GCR_JSON_KEY_BASE64: ${{ secrets.GCR_JSON_KEY_BASE64 }}
|
||||
|
6
.github/workflows/console.yml
vendored
6
.github/workflows/console.yml
vendored
@@ -49,7 +49,11 @@ jobs:
|
||||
cache: "pnpm"
|
||||
cache-dependency-path: pnpm-lock.yaml
|
||||
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
|
||||
run: make console_build
|
||||
name: Install dependencies
|
||||
run: pnpm install
|
||||
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
|
||||
name: Build console with Turbo
|
||||
run: pnpm turbo build --filter=./console
|
||||
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
|
61
.github/workflows/docs.yml
vendored
Normal file
61
.github/workflows/docs.yml
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
name: Build docs
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
node_version:
|
||||
required: true
|
||||
type: string
|
||||
buf_version:
|
||||
required: true
|
||||
type: string
|
||||
outputs:
|
||||
cache_key:
|
||||
value: ${{ jobs.build.outputs.cache_key }}
|
||||
cache_path:
|
||||
value: ${{ jobs.build.outputs.cache_path }}
|
||||
|
||||
env:
|
||||
cache_path: docs/build
|
||||
|
||||
jobs:
|
||||
build:
|
||||
outputs:
|
||||
cache_key: ${{ steps.cache.outputs.cache-primary-key }}
|
||||
cache_path: ${{ env.cache_path }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/cache/restore@v4
|
||||
timeout-minutes: 1
|
||||
continue-on-error: true
|
||||
id: cache
|
||||
with:
|
||||
key: docs-${{ hashFiles('docs', 'proto', '!docs/build', '!docs/node_modules') }}
|
||||
restore-keys: |
|
||||
docs-
|
||||
path: ${{ env.cache_path }}
|
||||
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
|
||||
uses: bufbuild/buf-setup-action@v1
|
||||
with:
|
||||
github_token: ${{ github.token }}
|
||||
version: ${{ inputs.buf_version }}
|
||||
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
|
||||
uses: pnpm/action-setup@v4
|
||||
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ inputs.node_version }}
|
||||
cache: "pnpm"
|
||||
cache-dependency-path: pnpm-lock.yaml
|
||||
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
|
||||
name: Install dependencies
|
||||
run: pnpm install
|
||||
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
|
||||
name: Build docs with Turbo
|
||||
run: pnpm turbo build --filter=./docs
|
||||
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ env.cache_path }}
|
||||
key: ${{ steps.cache.outputs.cache-primary-key }}
|
13
.github/workflows/login-quality.yml
vendored
13
.github/workflows/login-quality.yml
vendored
@@ -4,7 +4,7 @@ on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
ignore-run-cache:
|
||||
description: 'Ignore run caches'
|
||||
description: "Ignore run caches"
|
||||
type: boolean
|
||||
required: true
|
||||
node_version:
|
||||
@@ -43,7 +43,16 @@ jobs:
|
||||
run: |
|
||||
tar -xvf .artifacts/zitadel-linux-amd64.tar.gz
|
||||
mv zitadel-linux-amd64/zitadel ./zitadel
|
||||
- run: make login_quality
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ inputs.node_version }}
|
||||
cache: "pnpm"
|
||||
cache-dependency-path: pnpm-lock.yaml
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Run login quality checks with Turbo
|
||||
run: pnpm turbo lint test:unit --filter=./login
|
||||
env:
|
||||
# latest if branch is main, otherwise image version which is the pull request number
|
||||
LOGIN_BAKE_CLI: depot bake
|
||||
|
40
docs/turbo.json
Normal file
40
docs/turbo.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"$schema": "https://turbo.build/schema.json",
|
||||
"extends": ["//"],
|
||||
"tasks": {
|
||||
"generate": {
|
||||
"dependsOn": ["^generate"],
|
||||
"outputs": ["docs/api/**", "docs/self-hosting/manage/configure/*.yaml"],
|
||||
"cache": true
|
||||
},
|
||||
"generate:grpc": {
|
||||
"dependsOn": ["^generate"],
|
||||
"outputs": ["docs/api/**"],
|
||||
"cache": true
|
||||
},
|
||||
"generate:apidocs": {
|
||||
"dependsOn": ["generate:grpc"],
|
||||
"outputs": ["docs/api/**"],
|
||||
"cache": true
|
||||
},
|
||||
"generate:configdocs": {
|
||||
"outputs": ["docs/self-hosting/manage/configure/*.yaml"],
|
||||
"cache": true
|
||||
},
|
||||
"build": {
|
||||
"dependsOn": ["generate"],
|
||||
"outputs": ["build/**"],
|
||||
"cache": true
|
||||
},
|
||||
"start": {
|
||||
"dependsOn": ["generate"],
|
||||
"cache": false,
|
||||
"persistent": true
|
||||
},
|
||||
"start:api": {
|
||||
"dependsOn": ["generate"],
|
||||
"cache": false,
|
||||
"persistent": true
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user