commit 860fef2467dfd2bd7cd442d56c8a77fc48c134b2 Author: xRain Date: Wed Aug 23 10:16:05 2023 +0800 first commit diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..5943f66 --- /dev/null +++ b/action.yml @@ -0,0 +1,17 @@ +name: 'update docker image on k8s in simcu-k8s' +description: 'update docker image on k8s in simcu-k8s' +inputs: + namespace: + description: "更新哪个Namespace下" + required: true + deployment: + description: "deployment名称" + required: true +runs: + using: 'composite' + steps: + - uses: docker://bitnami/kubectl:latest + with: + entrypoint: "/bin/bash" + args: | + -c "kubectl -s ${{env.ALIYUN_K8S_URL}} --token ${{env.ALIYUN_K8S_TOKEN}} -n ${{inputs.namespace}} set image deployment/${{inputs.deployment}} container-0=${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }}" \ No newline at end of file