From dd1a14f0d444bbf83ab5b31486b9e64170c87ef6 Mon Sep 17 00:00:00 2001 From: cialloo Date: Sun, 5 Oct 2025 20:28:36 +0800 Subject: [PATCH] update --- .github/workflows/cd.yml | 9 +++++++++ .github/workflows/ci.yml | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 2bbb86d..6642fef 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,9 +1,16 @@ # Continuous Deployment Workflow # This workflow deploys your application to Kubernetes cluster +# Trigger: After successful CI build or manual dispatch name: CD - Deploy to Kubernetes on: + workflow_run: + workflows: ["CI - Build and Push"] + types: + - completed + branches: + - dev workflow_dispatch: inputs: image_tag: @@ -50,6 +57,8 @@ jobs: deploy: name: Deploy to Kubernetes runs-on: ubuntu-latest + # Only run if CI workflow succeeded (for workflow_run trigger) + if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }} steps: - name: Checkout code diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0bb29c..bb21650 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,13 @@ # Continuous Integration Workflow # This workflow builds and pushes Docker images to your private registry +# Trigger: Push to dev branch or manual dispatch name: CI - Build and Push on: + push: + branches: + - dev workflow_dispatch: inputs: image_tag: