ref: up
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
name: "Manual Deployment"
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
environment:
|
||||
description: 'Deployment environment (dev, staging, prod)'
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- dev
|
||||
- staging
|
||||
- prod
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy to ${{ github.event.inputs.environment }}
|
||||
runs-on: ubuntu-latest
|
||||
environment: ${{ github.event.inputs.environment }}
|
||||
steps:
|
||||
- name: ☸️ Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: ☸️ Setup kubectl
|
||||
uses: azure/setup-kubectl@v4
|
||||
with:
|
||||
version: 'v1.28.0'
|
||||
|
||||
- name: 🔐 Configure Kubeconfig
|
||||
uses: azure/k8s-set-context@v4
|
||||
with:
|
||||
method: kubeconfig
|
||||
kubeconfig: ${{ secrets[format('KUBECONFIG_{0}', github.event.inputs.environment)] }}
|
||||
|
||||
- name: 🚀 Install Fission CLI
|
||||
run: |
|
||||
curl -L https://github.com/fission/fission/releases/latest/download/fission-linux-amd64 -o /tmp/fission
|
||||
sudo install /tmp/fission /usr/local/bin/fission
|
||||
fission check
|
||||
|
||||
- name: 📦 Deploy
|
||||
run: |
|
||||
echo "Deploying to ${{ github.event.inputs.environment }} environment..."
|
||||
if [ "${{ github.event.inputs.environment }}" = "dev" ]; then
|
||||
fission deploy --dev
|
||||
else
|
||||
fission deploy
|
||||
fi
|
||||
|
||||
- name: 🔔 Notify
|
||||
if: always()
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const env = '${{ github.event.inputs.environment }}';
|
||||
const status = '${{ job.status }}';
|
||||
console.log(`Deployment to ${env} completed with status: ${status}`);
|
||||
Reference in New Issue
Block a user