File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : ' Deploy to Kubernetes'
2+ description : ' Deploy application to a Kubernetes Cluster. Requires Kubernetes to be configured first.'
3+
4+ inputs :
5+ environment :
6+ description : ' "test" or "prod"'
7+ namespace-name :
8+ description : ' Digital Ocean namespace name'
9+ deployment-name :
10+ description : ' Kubernetes deployment name'
11+
12+ runs :
13+ using : " composite"
14+ steps :
15+ - name : Deploy to Kubernetes
16+ run : kubectl apply -f infrastructure/kubernetes.${{ inputs.environment }}.yml
17+ shell : bash
18+
19+ - name : Verify deployment
20+ id : verify
21+ run : kubectl rollout status -n ${{ inputs.namespace-name }} deployment/${{ inputs.deployment-name }}
22+ shell : bash
23+
24+ - name : Undo deployment if failed
25+ if : ${{ failure() && steps.verify.conclusion == 'failure' }}
26+ run : kubectl rollout undo -n ${{ inputs.namespace-name }} deployment/${{ inputs.deployment-name }}
27+ shell : bash
Original file line number Diff line number Diff line change 1+ name : ' Setup Kubernetes for Digital-Ocean.'
2+ description : ' Setup Digital-Ocean CLI and configure Kubernetes.'
3+
4+ inputs :
5+ cluster-name :
6+ description : ' Kubernetes cluster name'
7+ digital-ocean-token :
8+ description : ' Digital Ocean access token'
9+
10+ runs :
11+ using : " composite"
12+ steps :
13+ - name : Install doctl
14+ uses : digitalocean/action-doctl@v2
15+ with :
16+ token : ${{ inputs.digital-ocean-token }}
17+
18+ - name : Save DigitalOcean kubeconfig with short-lived credentials
19+ run : doctl kubernetes cluster kubeconfig save --expiry-seconds 600 ${{ inputs.cluster-name }}
20+ shell : bash
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments