update identifier can dynamic
This commit is contained in:
6
.github/workflows/deploy.yml
vendored
6
.github/workflows/deploy.yml
vendored
@@ -9,6 +9,9 @@ on:
|
|||||||
app-target:
|
app-target:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
identifier:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
secrets:
|
secrets:
|
||||||
REGISTRY:
|
REGISTRY:
|
||||||
required: true
|
required: true
|
||||||
@@ -26,6 +29,7 @@ jobs:
|
|||||||
REGISTRY: ${{ secrets.REGISTRY }}
|
REGISTRY: ${{ secrets.REGISTRY }}
|
||||||
APP: ${{ inputs.app-name }}
|
APP: ${{ inputs.app-name }}
|
||||||
APPTARGET: ${{inputs.app-target}}
|
APPTARGET: ${{inputs.app-target}}
|
||||||
|
IDENTIFIER: ${{inputs.identifier}}
|
||||||
run: |
|
run: |
|
||||||
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
|
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
|
||||||
chmod +x kubectl
|
chmod +x kubectl
|
||||||
@@ -33,5 +37,5 @@ jobs:
|
|||||||
cd ~
|
cd ~
|
||||||
mkdir .kube
|
mkdir .kube
|
||||||
echo "$K8S_CONFIG" > .kube/config
|
echo "$K8S_CONFIG" > .kube/config
|
||||||
kubectl set image deployment/$APP $APPTARGET=$REGISTRY:$GITHUB_SHA
|
kubectl set image deployment/$APP $APPTARGET=$REGISTRY:$IDENTIFIER
|
||||||
kubectl rollout restart deployment/$APP
|
kubectl rollout restart deployment/$APP
|
||||||
|
|||||||
Reference in New Issue
Block a user