This commit is contained in:
parent
38c9b5148c
commit
a803f63cc4
11
.github/workflows/CCC.yml
vendored
11
.github/workflows/CCC.yml
vendored
@ -137,11 +137,12 @@ jobs:
|
||||
LUCI_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
LUCI_COMMIT=$(git rev-parse --short HEAD)
|
||||
|
||||
# 格式化 LuCI 版本信息,适应 URL 编码的格式
|
||||
# 格式化 LuCI 版本信息,将空格替换为下划线,并构建为目标格式
|
||||
LUCI_VERSION="LuCI_${LUCI_BRANCH}_branch_(git--${LUCI_COMMIT})"
|
||||
LUCI_VERSION_ENCODED=$(echo $LUCI_VERSION | sed 's/ /_/g; s/(/%28/g; s/)/%29/g; s/-/%2D/g')
|
||||
echo "LUCI_VERSION_ENCODED=$LUCI_VERSION_ENCODED" >> $GITHUB_ENV
|
||||
echo "LuCI 版本信息:$LUCI_VERSION_ENCODED"
|
||||
# 替换字符,以确保徽章 URL 正确
|
||||
LUCI_VERSION_FORMATTED=$(echo "$LUCI_VERSION" | sed 's/ /_/g; s/-/--/g')
|
||||
echo "LUCI_VERSION_FORMATTED=$LUCI_VERSION_FORMATTED" >> $GITHUB_ENV
|
||||
echo "LuCI 版本信息:$LUCI_VERSION_FORMATTED"
|
||||
|
||||
# 更新 README.md 文件
|
||||
- name: ✏️ 更新 README.md 文件
|
||||
@ -157,7 +158,7 @@ jobs:
|
||||
KERNEL_VERSION="${FULL_KERNEL_VERSION}"
|
||||
DISTRIB_REVISION="${{ env.distrib_revision }}"
|
||||
#LuCI 版本
|
||||
LUCI_VERSION="${LUCI_VERSION_ENCODED}"
|
||||
LUCI_VERSION="${LUCI_VERSION_FORMATTED}"
|
||||
|
||||
NEW_CONTENT="<!--action-tag-start-->\n\n"
|
||||
NEW_CONTENT+="![Latest Version](https://img.shields.io/badge/固件版本-${DISTRIB_REVISION}-brightgreen)\n"
|
||||
|
Loading…
Reference in New Issue
Block a user