ci: expose dev manual actions on default branch
Some checks failed
CI/CD Pipeline / Manual Actions Require Dev Branch (pull_request) Has been skipped
CI/CD Pipeline / Run Tests (pull_request) Failing after 13m8s
CI/CD Pipeline / Code Quality Checks (pull_request) Failing after 13m9s
CI/CD Pipeline / Telegram Notify Success (pull_request) Has been skipped
Some checks failed
CI/CD Pipeline / Manual Actions Require Dev Branch (pull_request) Has been skipped
CI/CD Pipeline / Run Tests (pull_request) Failing after 13m8s
CI/CD Pipeline / Code Quality Checks (pull_request) Failing after 13m9s
CI/CD Pipeline / Telegram Notify Success (pull_request) Has been skipped
This commit is contained in:
@@ -10,6 +10,20 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- dev
|
- dev
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
manual_action:
|
||||||
|
description: "Manual action: dokploy_start or cleanup_dev_database"
|
||||||
|
required: true
|
||||||
|
default: "dokploy_start"
|
||||||
|
dokploy_target:
|
||||||
|
description: "Dokploy dev target: all, web, or celery"
|
||||||
|
required: true
|
||||||
|
default: "all"
|
||||||
|
cleanup_confirm:
|
||||||
|
description: "Type CLEAN_DEV_DB to drop and recreate the dev public schema"
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PYTHON_VERSION: "3.11"
|
PYTHON_VERSION: "3.11"
|
||||||
@@ -18,7 +32,7 @@ jobs:
|
|||||||
lint:
|
lint:
|
||||||
name: Code Quality Checks
|
name: Code Quality Checks
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ !contains(github.event.head_commit.message, '#no_lint') }}
|
if: ${{ github.event_name != 'workflow_dispatch' && !contains(github.event.head_commit.message, '#no_lint') }}
|
||||||
env:
|
env:
|
||||||
TG_BOT_KEY: ${{ secrets.TG_BOT_KEY }}
|
TG_BOT_KEY: ${{ secrets.TG_BOT_KEY }}
|
||||||
TG_CHANNEL: ${{ secrets.TG_CHANNEL }}
|
TG_CHANNEL: ${{ secrets.TG_CHANNEL }}
|
||||||
@@ -82,7 +96,7 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
name: Run Tests
|
name: Run Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ !contains(github.event.head_commit.message, '#no_test') }}
|
if: ${{ github.event_name != 'workflow_dispatch' && !contains(github.event.head_commit.message, '#no_test') }}
|
||||||
env:
|
env:
|
||||||
TG_BOT_KEY: ${{ secrets.TG_BOT_KEY }}
|
TG_BOT_KEY: ${{ secrets.TG_BOT_KEY }}
|
||||||
TG_CHANNEL: ${{ secrets.TG_CHANNEL }}
|
TG_CHANNEL: ${{ secrets.TG_CHANNEL }}
|
||||||
@@ -147,6 +161,7 @@ jobs:
|
|||||||
needs: [lint, test]
|
needs: [lint, test]
|
||||||
if: |
|
if: |
|
||||||
always() &&
|
always() &&
|
||||||
|
github.event_name != 'workflow_dispatch' &&
|
||||||
needs.lint.result == 'success' &&
|
needs.lint.result == 'success' &&
|
||||||
needs.test.result == 'success'
|
needs.test.result == 'success'
|
||||||
env:
|
env:
|
||||||
@@ -172,3 +187,16 @@ jobs:
|
|||||||
curl -fsS -X POST "https://api.telegram.org/bot${TG_BOT_KEY}/sendMessage" \
|
curl -fsS -X POST "https://api.telegram.org/bot${TG_BOT_KEY}/sendMessage" \
|
||||||
-d "chat_id=${TG_CHANNEL}" \
|
-d "chat_id=${TG_CHANNEL}" \
|
||||||
--data-urlencode "text=${MSG}"
|
--data-urlencode "text=${MSG}"
|
||||||
|
|
||||||
|
manual_actions_require_dev:
|
||||||
|
name: Manual Actions Require Dev Branch
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/dev' }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Explain manual action branch
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
echo "Manual actions are implemented in the dev workflow."
|
||||||
|
echo "Run this workflow with branch/ref dev."
|
||||||
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user