ci: split manual dev actions from push pipeline
This commit is contained in:
66
.gitea/workflows/manual-dev-actions.yml
Normal file
66
.gitea/workflows/manual-dev-actions.yml
Normal file
@@ -0,0 +1,66 @@
|
||||
name: Manual Dev Actions
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
manual_action:
|
||||
description: "Manual action: noop, build_golden_images, cleanup_dev_database, or dokploy_start"
|
||||
required: true
|
||||
default: "noop"
|
||||
dokploy_target:
|
||||
description: "Dokploy dev target: all, web, worker, or beat"
|
||||
required: true
|
||||
default: "all"
|
||||
cleanup_confirm:
|
||||
description: "Type CLEAN_DEV_DB to drop and recreate the dev database as UTF8"
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
concurrency:
|
||||
group: mostovik-backend-manual-dev-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
REGISTRY_API_URL: "https://registry.dev.nii-ecos.ru/v2/"
|
||||
REGISTRY_HOST: "registry.dev.nii-ecos.ru"
|
||||
REGISTRY_NAMESPACE: "${{ github.repository_owner }}"
|
||||
WEB_IMAGE: "mostovik-backend-web"
|
||||
CELERY_IMAGE: "mostovik-backend-celery"
|
||||
CI_GOLDEN_IMAGE: "mostovik-backend-ci-golden"
|
||||
WEB_GOLDEN_IMAGE: "mostovik-backend-web-golden"
|
||||
CELERY_GOLDEN_IMAGE: "mostovik-backend-celery-golden"
|
||||
GOLDEN_TAG: "py311-uv0.7.2"
|
||||
DOKPLOY_DEV_WEB_WEBHOOK_URL: "https://deploy.dev.nii-ecos.ru/api/deploy/_EjfuYBpzGJ18uPwBZ3iF"
|
||||
DOKPLOY_DEV_WORKER_WEBHOOK_URL: "https://deploy.dev.nii-ecos.ru/api/deploy/hltL7K2HmG1a8EIzr-mVA"
|
||||
DOKPLOY_DEV_BEAT_WEBHOOK_URL: "https://deploy.dev.nii-ecos.ru/api/deploy/RkdykbqU6faErrZBAN9Rv"
|
||||
|
||||
jobs:
|
||||
manual_dev_action:
|
||||
name: Run Manual Dev Action
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
MANUAL_ACTION: ${{ github.event.inputs.manual_action }}
|
||||
DOKPLOY_TARGET: ${{ github.event.inputs.dokploy_target }}
|
||||
CLEANUP_CONFIRM: ${{ github.event.inputs.cleanup_confirm }}
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_TOKEN }}
|
||||
DOKPLOY_API_TOKEN: ${{ secrets.DOKPLOY_API_TOKEN }}
|
||||
POSTGRES_HOST: "10.10.0.114"
|
||||
POSTGRES_PORT: "5432"
|
||||
POSTGRES_DB: "mostovik"
|
||||
POSTGRES_USER: "postgres"
|
||||
POSTGRES_PASSWORD: "postgres"
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
run: |
|
||||
set -euo pipefail
|
||||
REPO_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
|
||||
BRANCH="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}"
|
||||
git -c core.hooksPath=/dev/null clone --depth=1 --branch="${BRANCH}" "${REPO_URL}" .
|
||||
git -c core.hooksPath=/dev/null checkout "${GITHUB_SHA}"
|
||||
|
||||
- name: Run selected action
|
||||
run: bash scripts/ci/manual_dev_action.sh
|
||||
Reference in New Issue
Block a user