ci: move community actions to self-hosted runners
This commit is contained in:
@@ -14,7 +14,7 @@ concurrency:
|
|||||||
jobs:
|
jobs:
|
||||||
rust:
|
rust:
|
||||||
name: Rust Checks
|
name: Rust Checks
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, linux, x64]
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:16-alpine
|
image: postgres:16-alpine
|
||||||
@@ -42,9 +42,6 @@ jobs:
|
|||||||
toolchain: 1.85.0
|
toolchain: 1.85.0
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
|
|
||||||
- name: Cache cargo artifacts
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
- name: Check formatting
|
- name: Check formatting
|
||||||
run: cargo fmt --all --check
|
run: cargo fmt --all --check
|
||||||
|
|
||||||
@@ -59,7 +56,7 @@ jobs:
|
|||||||
|
|
||||||
ui:
|
ui:
|
||||||
name: UI Checks
|
name: UI Checks
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, linux, x64]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -69,8 +66,6 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 22
|
||||||
cache: npm
|
|
||||||
cache-dependency-path: apps/ui/package-lock.json
|
|
||||||
|
|
||||||
- name: Install UI dependencies
|
- name: Install UI dependencies
|
||||||
working-directory: apps/ui
|
working-directory: apps/ui
|
||||||
@@ -85,7 +80,7 @@ jobs:
|
|||||||
|
|
||||||
frontend-e2e:
|
frontend-e2e:
|
||||||
name: Frontend E2E
|
name: Frontend E2E
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, linux, x64]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -96,15 +91,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
toolchain: 1.85.0
|
toolchain: 1.85.0
|
||||||
|
|
||||||
- name: Cache cargo artifacts
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 22
|
||||||
cache: npm
|
|
||||||
cache-dependency-path: apps/ui/package-lock.json
|
|
||||||
|
|
||||||
- name: Install UI dependencies
|
- name: Install UI dependencies
|
||||||
working-directory: apps/ui
|
working-directory: apps/ui
|
||||||
@@ -136,7 +126,7 @@ jobs:
|
|||||||
|
|
||||||
deployment:
|
deployment:
|
||||||
name: Deployment Manifests
|
name: Deployment Manifests
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, linux, x64]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ jobs:
|
|||||||
github.event.workflow_run.conclusion == 'success' &&
|
github.event.workflow_run.conclusion == 'success' &&
|
||||||
github.event.workflow_run.head_branch == 'main'
|
github.event.workflow_run.head_branch == 'main'
|
||||||
)
|
)
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, linux, x64]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -78,8 +78,6 @@ jobs:
|
|||||||
tags: |
|
tags: |
|
||||||
${{ steps.image.outputs.name }}:${{ env.IMAGE_TAG }}
|
${{ steps.image.outputs.name }}:${{ env.IMAGE_TAG }}
|
||||||
${{ steps.image.outputs.name }}:main
|
${{ steps.image.outputs.name }}:main
|
||||||
cache-from: type=gha,scope=${{ matrix.name }}
|
|
||||||
cache-to: type=gha,mode=max,scope=${{ matrix.name }}
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
needs: build-images
|
needs: build-images
|
||||||
@@ -90,7 +88,7 @@ jobs:
|
|||||||
github.event.workflow_run.conclusion == 'success' &&
|
github.event.workflow_run.conclusion == 'success' &&
|
||||||
github.event.workflow_run.head_branch == 'main'
|
github.event.workflow_run.head_branch == 'main'
|
||||||
)
|
)
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, linux, x64]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-release-assets:
|
build-release-assets:
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, linux, x64]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -33,15 +33,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
toolchain: 1.85.0
|
toolchain: 1.85.0
|
||||||
|
|
||||||
- name: Cache cargo artifacts
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 22
|
||||||
cache: npm
|
|
||||||
cache-dependency-path: apps/ui/package-lock.json
|
|
||||||
|
|
||||||
- name: Build release binaries
|
- name: Build release binaries
|
||||||
run: cargo build --release -p admin-api -p mcp-server
|
run: cargo build --release -p admin-api -p mcp-server
|
||||||
@@ -86,7 +81,7 @@ jobs:
|
|||||||
dist/crank-community-${{ env.IMAGE_TAG }}-sbom.spdx.json
|
dist/crank-community-${{ env.IMAGE_TAG }}-sbom.spdx.json
|
||||||
|
|
||||||
publish-images:
|
publish-images:
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, linux, x64]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -124,14 +119,12 @@ jobs:
|
|||||||
tags: |
|
tags: |
|
||||||
${{ matrix.image }}:${{ env.IMAGE_TAG }}
|
${{ matrix.image }}:${{ env.IMAGE_TAG }}
|
||||||
${{ matrix.image }}:latest
|
${{ matrix.image }}:latest
|
||||||
cache-from: type=gha,scope=release-${{ matrix.name }}
|
|
||||||
cache-to: type=gha,mode=max,scope=release-${{ matrix.name }}
|
|
||||||
|
|
||||||
github-release:
|
github-release:
|
||||||
needs:
|
needs:
|
||||||
- build-release-assets
|
- build-release-assets
|
||||||
- publish-images
|
- publish-images
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, linux, x64]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download release artifacts
|
- name: Download release artifacts
|
||||||
|
|||||||
@@ -96,6 +96,11 @@ Crank - платформа для публикации внешних API в в
|
|||||||
- `CD`, который после успешного `CI` на `main` собирает versioned images, пушит их в `GHCR` и деплоит Community через `deploy/community/docker-compose.yml`;
|
- `CD`, который после успешного `CI` на `main` собирает versioned images, пушит их в `GHCR` и деплоит Community через `deploy/community/docker-compose.yml`;
|
||||||
- containerized Community deployment через `deploy/community/docker-compose.yml`.
|
- containerized Community deployment через `deploy/community/docker-compose.yml`.
|
||||||
|
|
||||||
|
Важно:
|
||||||
|
|
||||||
|
- GitHub Actions в этом репозитории рассчитаны только на `self-hosted` runner;
|
||||||
|
- `ubuntu-latest`, `actions/cache` и `type=gha` intentionally не используются, чтобы не тратить платные GitHub-hosted минуты и cache quota на private repository.
|
||||||
|
|
||||||
## Поддерживаемые протоколы
|
## Поддерживаемые протоколы
|
||||||
|
|
||||||
В целевой модели платформа ориентируется на:
|
В целевой модели платформа ориентируется на:
|
||||||
|
|||||||
Reference in New Issue
Block a user