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