From 860fef2467dfd2bd7cd442d56c8a77fc48c134b2 Mon Sep 17 00:00:00 2001 From: xRain Date: Wed, 23 Aug 2023 10:16:05 +0800 Subject: [PATCH] first commit --- action.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 action.yml 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