From 7212f406c7336041070a3481aa3bdc6d104b88e8 Mon Sep 17 00:00:00 2001 From: LIRUI <298977887@qq.com> Date: Tue, 29 Oct 2024 00:27:28 +0800 Subject: [PATCH] 1028.yml --- .github/workflows/发布wordpress文章.yml | 38 ++++++++++++++----------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/workflows/发布wordpress文章.yml b/.github/workflows/发布wordpress文章.yml index 381e86e..91a01ea 100644 --- a/.github/workflows/发布wordpress文章.yml +++ b/.github/workflows/发布wordpress文章.yml @@ -23,9 +23,8 @@ jobs: run: | CONTENT=$(> $GITHUB_ENV - echo "$CONTENT" | jq -Rs . >> $GITHUB_ENV - echo "EOF" >> $GITHUB_ENV + wp_content=$(echo "$CONTENT" | jq -Rs .) + echo "wp_content=$wp_content" >> $GITHUB_ENV # 2. 读取固件版本 DISTRIB_REVISION.txt - name: 读取 DISTRIB_REVISION.txt 中的固件版本 @@ -47,23 +46,29 @@ jobs: WORDPRESS_PASSWORD: ${{ secrets.WORDPRESS_PASSWORD }} POST_ID: 829 POST_STATUS: "draft" + wp_content: ${{ env.wp_content }} + firmware_version: ${{ env.firmware_version }} run: | FORMATTED_TIME=$(TZ='Asia/Shanghai' date "+%Y年%m月%d日") # 创建 JSON 数据内容,保持 README 内容的原始格式 - JSON_PAYLOAD=$(cat <