update identifier to tag

This commit is contained in:
adityap1337
2022-09-07 12:16:49 +08:00
parent 07c77604f5
commit 31b066f267

View File

@@ -9,7 +9,7 @@ on:
app-target: app-target:
required: true required: true
type: string type: string
identifier: image-tag:
required: true required: true
type: string type: string
secrets: secrets:
@@ -29,7 +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}} TAG: ${{inputs.image-tag}}
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
@@ -37,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:$IDENTIFIER kubectl set image deployment/$APP $APPTARGET=$REGISTRY:$TAG
kubectl rollout restart deployment/$APP kubectl rollout restart deployment/$APP