print context var

This commit is contained in:
snake 2024-11-13 10:21:11 +08:00 committed by GitHub
parent 8ed2695286
commit 64ffe96480
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -49,18 +49,9 @@ jobs:
- name: print one - name: print one
run: | run: |
echo "Commit ID: ${{ github.sha }}" echo "Commit ID: ${{ github.sha }}"
echo "IMAGEHASH=${{ github.sha }}" >> $GITHUB_ENV echo "IMAGEHASH=${{ github.sha }}"
- name: print two 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\""
run: | echo ${{ format($UPDATECMD,$IMAGEHASH) }}
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) }}
- name: Prepare - name: Prepare
run: | run: |