Update CI/CD workflows to enable automatic triggers after successful builds
All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 10s

This commit is contained in:
2025-10-05 17:48:15 +08:00
parent a957004142
commit 3abb7e0ad1
2 changed files with 15 additions and 4 deletions

View File

@@ -1,11 +1,17 @@
# Continuous Deployment Workflow # Continuous Deployment Workflow
# This workflow deploys your application to Kubernetes cluster # This workflow deploys your application to Kubernetes cluster
# Trigger: Manual dispatch only # Trigger: After successful CI build or manual dispatch
name: CD - Deploy to Kubernetes name: CD - Deploy to Kubernetes
# Trigger configuration - manual dispatch only # Trigger configuration - automatic after CI success, manual dispatch available
on: on:
workflow_run:
workflows: ["CI - Build and Push"]
types:
- completed
branches:
- dev
workflow_dispatch: workflow_dispatch:
inputs: inputs:
image_tag: image_tag:
@@ -50,6 +56,8 @@ jobs:
deploy: deploy:
name: Deploy to Kubernetes name: Deploy to Kubernetes
runs-on: ubuntu-latest 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: steps:
# Step 1: Checkout code from repository # Step 1: Checkout code from repository

View File

@@ -1,11 +1,14 @@
# Continuous Integration Workflow # Continuous Integration Workflow
# This workflow builds and pushes Docker images to your private registry # This workflow builds and pushes Docker images to your private registry
# Trigger: Manual dispatch only # Trigger: Push to dev branch or manual dispatch
name: CI - Build and Push name: CI - Build and Push
# Trigger configuration - manual dispatch only # Trigger configuration - automatic on dev push, manual dispatch available
on: on:
push:
branches:
- dev
workflow_dispatch: workflow_dispatch:
inputs: inputs:
image_tag: image_tag: