From 64ffe96480512a2a5fb43f5f54384c02843df82e Mon Sep 17 00:00:00 2001 From: snake <164011252@qq.com> Date: Wed, 13 Nov 2024 10:21:11 +0800 Subject: [PATCH] print context var --- .github/workflows/build-push.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 249fcd28b6..6e7f197913 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -49,18 +49,9 @@ jobs: - name: print one run: | echo "Commit ID: ${{ github.sha }}" - echo "IMAGEHASH=${{ github.sha }}" >> $GITHUB_ENV - - name: print two - run: | - echo "hash: ${{ env.IMAGEHASH }}" - echo "IMAGENAME={\"kind\":\"deployments\",\"namespace\":\"dify\",\"name\":\"dify-api\",\"images\":{\"langgenius/dify-api\":\"langgenius/dify-api:$IMAGEHASH\"}}" >> $GITHUB_ENV - - name: print three - run: | - printf '%s\n' ${{ toJson(env.IMAGENAME) }} - echo "CURLCOMMAND=curl -X PUT -H \"content-type: application/json\" -H \"Cookie: KuboardUsername=admin; KuboardAccessKey=pwmfkfbbrxr4.mesxici5nbnfamxkjfe43kn33shba8nj\" -d ${{ toJSON(env.IMAGENAME) }} \"https://plugin-kuboard.dify.dev/kuboard-api/cluster/dify-plugin-1/kind/CICDApi/admin/resource/updateImageTag\"" >> $GITHUB_ENV - - name: print four - run: | - printf '%s\n' ${{ toJSON(env.CURLCOMMAND) }} + echo "IMAGEHASH=${{ github.sha }}" + echo "UPDATECMD=curl -X PUT -H \"content-type: application/json\" -H \"Cookie: KuboardUsername=admin; KuboardAccessKey=pwmfkfbbrxr4.mesxici5nbnfamxkjfe43kn33shba8nj\" -d "{\"kind\":\"deployments\",\"namespace\":\"dify\",\"name\":\"dify-api\",\"images\":{\"langgenius/dify-api\":\"langgenius/dify-api:{0}\"}}" \"https://plugin-kuboard.dify.dev/kuboard-api/cluster/dify-plugin-1/kind/CICDApi/admin/resource/updateImageTag\"" + echo ${{ format($UPDATECMD,$IMAGEHASH) }} - name: Prepare run: |