update
This commit is contained in:
10
.github/workflows/deploy.yml
vendored
10
.github/workflows/deploy.yml
vendored
@@ -9,14 +9,10 @@ on:
|
|||||||
app-target:
|
app-target:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
# REGISTRY:
|
|
||||||
# required: true
|
|
||||||
# k8s-config:
|
|
||||||
# required: true
|
|
||||||
secrets:
|
secrets:
|
||||||
REGISTRY:
|
REGISTRY:
|
||||||
required: true
|
required: true
|
||||||
K8S_DEV:
|
K8S_CONFIG:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -26,7 +22,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
env:
|
env:
|
||||||
K8S_DEV: ${{secrets.K8S_DEV}}
|
K8S_CONFIG: ${{secrets.K8S_CONFIG}}
|
||||||
REGISTRY: ${{ secrets.REGISTRY }}
|
REGISTRY: ${{ secrets.REGISTRY }}
|
||||||
APP: ${{ inputs.app-name }}
|
APP: ${{ inputs.app-name }}
|
||||||
APPTARGET: ${{inputs.app-target}}
|
APPTARGET: ${{inputs.app-target}}
|
||||||
@@ -36,6 +32,6 @@ jobs:
|
|||||||
mv kubectl /usr/local/bin/
|
mv kubectl /usr/local/bin/
|
||||||
cd ~
|
cd ~
|
||||||
mkdir .kube
|
mkdir .kube
|
||||||
echo "$K8S_DEV" > .kube/config
|
echo "$K8S_CONFIG" > .kube/config
|
||||||
kubectl set image deployment/$APP $APPTARGET=$REGISTRY:$GITHUB_SHA
|
kubectl set image deployment/$APP $APPTARGET=$REGISTRY:$GITHUB_SHA
|
||||||
kubectl rollout restart deployment/$APP
|
kubectl rollout restart deployment/$APP
|
||||||
|
|||||||
Reference in New Issue
Block a user