2023-07-17 10:08:20 +02:00
|
|
|
name: ZITADEL CI/CD
|
|
|
|
|
2023-07-17 10:55:41 +02:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
workflow_dispatch:
|
2023-07-17 10:08:20 +02:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
packages: write
|
2023-07-25 08:43:06 +02:00
|
|
|
issues: write
|
|
|
|
pull-requests: write
|
2023-07-17 10:08:20 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
core:
|
|
|
|
uses: ./.github/workflows/core.yml
|
|
|
|
with:
|
|
|
|
node_version: '18'
|
|
|
|
buf_version: 'latest'
|
|
|
|
go_version: '1.20'
|
|
|
|
|
|
|
|
console:
|
|
|
|
uses: ./.github/workflows/console.yml
|
|
|
|
with:
|
|
|
|
node_version: '18'
|
|
|
|
buf_version: 'latest'
|
|
|
|
|
|
|
|
version:
|
|
|
|
uses: ./.github/workflows/version.yml
|
|
|
|
with:
|
|
|
|
semantic_version: '19.0.2'
|
|
|
|
dry_run: true
|
|
|
|
|
|
|
|
compile:
|
|
|
|
needs: [core, console, version]
|
|
|
|
uses: ./.github/workflows/compile.yml
|
|
|
|
with:
|
|
|
|
go_version: '1.20'
|
|
|
|
core_cache_key: ${{ needs.core.outputs.cache_key }}
|
|
|
|
console_cache_key: ${{ needs.console.outputs.cache_key }}
|
|
|
|
core_cache_path: ${{ needs.core.outputs.cache_path }}
|
|
|
|
console_cache_path: ${{ needs.console.outputs.cache_path }}
|
|
|
|
version: ${{ needs.version.outputs.version }}
|
|
|
|
|
|
|
|
core-unit-test:
|
|
|
|
needs: core
|
|
|
|
uses: ./.github/workflows/core-unit-test.yml
|
|
|
|
with:
|
|
|
|
go_version: '1.20'
|
|
|
|
core_cache_key: ${{ needs.core.outputs.cache_key }}
|
|
|
|
core_cache_path: ${{ needs.core.outputs.cache_path }}
|
|
|
|
|
|
|
|
core-integration-test:
|
|
|
|
needs: core
|
|
|
|
uses: ./.github/workflows/core-integration-test.yml
|
|
|
|
with:
|
|
|
|
go_version: '1.20'
|
|
|
|
core_cache_key: ${{ needs.core.outputs.cache_key }}
|
|
|
|
core_cache_path: ${{ needs.core.outputs.cache_path }}
|
|
|
|
|
|
|
|
lint:
|
|
|
|
needs: [core, console]
|
|
|
|
uses: ./.github/workflows/lint.yml
|
|
|
|
with:
|
|
|
|
go_version: '1.20'
|
|
|
|
node_version: '18'
|
|
|
|
buf_version: 'latest'
|
|
|
|
go_lint_version: 'v1.53.2'
|
|
|
|
core_cache_key: ${{ needs.core.outputs.cache_key }}
|
|
|
|
core_cache_path: ${{ needs.core.outputs.cache_path }}
|
|
|
|
|
|
|
|
container:
|
|
|
|
needs: [compile]
|
|
|
|
uses: ./.github/workflows/container.yml
|
2023-08-10 14:21:01 +02:00
|
|
|
secrets: inherit
|
|
|
|
permissions:
|
|
|
|
packages: write
|
|
|
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
2023-07-17 10:08:20 +02:00
|
|
|
with:
|
2023-08-10 14:21:01 +02:00
|
|
|
build_image_name: 'ghcr.io/zitadel/zitadel-build'
|
2023-07-17 10:08:20 +02:00
|
|
|
|
|
|
|
e2e:
|
|
|
|
uses: ./.github/workflows/e2e.yml
|
2023-08-10 14:21:01 +02:00
|
|
|
needs: [compile]
|
2023-07-17 10:08:20 +02:00
|
|
|
|
|
|
|
release:
|
|
|
|
uses: ./.github/workflows/release.yml
|
2023-08-10 14:21:01 +02:00
|
|
|
permissions:
|
|
|
|
packages: write
|
|
|
|
contents: write
|
|
|
|
issues: write
|
|
|
|
pull-requests: write
|
2023-07-17 10:08:20 +02:00
|
|
|
needs: [version, core-unit-test, core-integration-test, lint, container, e2e]
|
2023-08-10 14:21:01 +02:00
|
|
|
if: ${{ needs.version.outputs.published == 'true' && github.event_name == 'workflow_dispatch' }}
|
2023-07-17 10:08:20 +02:00
|
|
|
secrets:
|
|
|
|
GCR_JSON_KEY_BASE64: ${{ secrets.GCR_JSON_KEY_BASE64 }}
|
|
|
|
with:
|
2023-08-10 14:21:01 +02:00
|
|
|
build_image_name: ${{ needs.container.outputs.build_image }}
|
2023-07-17 10:08:20 +02:00
|
|
|
semantic_version: '19.0.2'
|
|
|
|
image_name: 'ghcr.io/zitadel/zitadel'
|
|
|
|
google_image_name: "europe-docker.pkg.dev/zitadel-common/zitadel-repo/zitadel"
|