Skip to content

Commit f433a4b

Browse files
committed
fix(ci): 修复调度构建通知缺少提交说明
1 parent 8a1b539 commit f433a4b

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@ jobs:
2828
with:
2929
fetch-depth: 0
3030

31+
- name: 设置构建元信息
32+
run: |
33+
echo "TIMESTAMP=$(TZ='Asia/Shanghai' date +'%Y-%m-%d %H:%M:%S')" >> "$GITHUB_ENV"
34+
echo "SHORT_HASH=${GITHUB_SHA::7}" >> "$GITHUB_ENV"
35+
echo "COMMIT_MESSAGE=$(git log -1 --format=%s "$GITHUB_SHA")" >> "$GITHUB_ENV"
36+
3137
- name: 构建并打包模块
3238
id: pack
3339
uses: ./.github/actions/build-module
3440

35-
- name: 设置构建元信息
36-
run: |
37-
echo "TIMESTAMP=$(TZ='Asia/Shanghai' date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
38-
echo "SHORT_HASH=${GITHUB_SHA::7}" >> $GITHUB_ENV
39-
4041
- name: 发布 Pre-release 到 GitHub Release
4142
env:
4243
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -72,7 +73,7 @@ jobs:
7273
**持续集成构建成功**
7374
7475
版本: `${{ steps.pack.outputs.version }}` (build ${{ steps.pack.outputs.commit_count }})
75-
说明: ${{ github.event.head_commit.message }}
76+
说明: ${{ env.COMMIT_MESSAGE }}
7677
7778
[下载开发包](${{ github.server_url }}/${{ github.repository }}/releases/tag/nightly)
7879
[提交记录](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})
@@ -90,6 +91,6 @@ jobs:
9091
**持续集成失败!**
9192
9293
提交: `${{ github.sha }}`
93-
说明: ${{ github.event.head_commit.message }}
94+
说明: ${{ env.COMMIT_MESSAGE }}
9495
9596
[点击查看构建日志](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})

0 commit comments

Comments
 (0)