Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49f11fb2d8 | ||
|
|
5ec0af5883 | ||
|
|
c81aac970c | ||
|
|
566a1754a7 | ||
|
|
1b7eed5d93 | ||
|
|
3a17dc4b52 | ||
|
|
e71d9d01fd | ||
|
|
160c5ebade | ||
|
|
fb4e7f3b1f | ||
|
|
9a472a4271 | ||
|
|
0d3ccadfef |
@@ -75,8 +75,8 @@ env:
|
||||
|
||||
# ===== Git 提交配置 =====
|
||||
# Git 用户配置
|
||||
GIT_USER_NAME: "github-actions[bot]"
|
||||
GIT_USER_EMAIL: "github-actions[bot]@users.noreply.github.com"
|
||||
GIT_USER_NAME: "ci-bot"
|
||||
GIT_USER_EMAIL: "ci-bot@tinysoft.com.cn"
|
||||
# Git 提交消息模板
|
||||
# 可用变量: {version} - 将被替换为实际的版本号
|
||||
# [skip ci] 标记防止触发无限循环
|
||||
@@ -94,8 +94,8 @@ env:
|
||||
IGNORE_PATTERNS: >-
|
||||
^Merge |
|
||||
^:memo: Auto update CHANGELOG|
|
||||
\[skip ci\]\s*$|
|
||||
\[ci skip\]\s*$|
|
||||
\\[skip ci\\]|
|
||||
\\[ci skip\\]|
|
||||
^Bump version|
|
||||
^Release v|
|
||||
^chore: update config$|
|
||||
@@ -182,17 +182,23 @@ jobs:
|
||||
PRERELEASE_DETECTED="${{ env.RELEASE_PRERELEASE_MODE }} (manually configured)"
|
||||
fi
|
||||
|
||||
# 处理忽略模式(转换为数组)
|
||||
# 处理忽略模式(去除空格,保持管道分隔格式)
|
||||
echo "🔧 处理忽略模式..."
|
||||
PROCESSED_PATTERNS=""
|
||||
IFS='|' read -ra PATTERNS_ARRAY <<< "${{ env.IGNORE_PATTERNS }}"
|
||||
IGNORE_JSON="["
|
||||
|
||||
for pattern in "${PATTERNS_ARRAY[@]}"; do
|
||||
# 去除首尾空格
|
||||
pattern=$(echo "$pattern" | xargs)
|
||||
# 使用 sed 去除首尾空格,保留转义字符
|
||||
pattern=$(echo "$pattern" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
|
||||
if [ -n "$pattern" ]; then
|
||||
IGNORE_JSON="${IGNORE_JSON}\"${pattern}\","
|
||||
if [ -z "$PROCESSED_PATTERNS" ]; then
|
||||
PROCESSED_PATTERNS="$pattern"
|
||||
else
|
||||
PROCESSED_PATTERNS="$PROCESSED_PATTERNS|$pattern"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IGNORE_JSON="${IGNORE_JSON%,}]"
|
||||
echo "✅ 已处理 $(echo "$PROCESSED_PATTERNS" | grep -o '|' | wc -l | awk '{print $1+1}') 个忽略模式"
|
||||
|
||||
# 导出处理后的配置到 GitHub 环境变量
|
||||
echo "CHANGELOG_VERSION=$CHANGELOG_VERSION" >> $GITHUB_ENV
|
||||
@@ -203,7 +209,7 @@ jobs:
|
||||
echo "PRERELEASE_STRIP_REGEX=$STRIP_REGEX" >> $GITHUB_ENV
|
||||
echo "PRERELEASE_MATCH_REGEX=$MATCH_REGEX" >> $GITHUB_ENV
|
||||
|
||||
echo "IGNORE_PATTERNS_JSON=$IGNORE_JSON" >> $GITHUB_ENV
|
||||
echo "IGNORE_PATTERNS_PROCESSED=$PROCESSED_PATTERNS" >> $GITHUB_ENV
|
||||
|
||||
# 显示配置摘要
|
||||
echo ""
|
||||
@@ -449,13 +455,7 @@ jobs:
|
||||
declare -a COMMITS_BODY
|
||||
|
||||
# 从环境变量加载忽略模式 (转换为 bash 数组)
|
||||
IFS='|' read -ra IGNORE_PATTERNS <<< "${{ env.IGNORE_PATTERNS }}"
|
||||
|
||||
# 去除每个模式的首尾空格
|
||||
for i in "${!IGNORE_PATTERNS[@]}"; do
|
||||
IGNORE_PATTERNS[$i]=$(echo "${IGNORE_PATTERNS[$i]}" | xargs)
|
||||
done
|
||||
|
||||
IFS='|' read -ra IGNORE_PATTERNS <<< "${{ env.IGNORE_PATTERNS_PROCESSED }}"
|
||||
echo "📋 已加载 ${#IGNORE_PATTERNS[@]} 个忽略模式"
|
||||
|
||||
COMMIT_INDEX=0
|
||||
@@ -548,7 +548,7 @@ jobs:
|
||||
|
||||
echo ""
|
||||
echo "📊 提交统计:"
|
||||
echo " ✓ 有效提交: $VALID_COUNT"
|
||||
echo " ✅ 有效提交: $VALID_COUNT"
|
||||
echo " ⏭️ 已跳过: $SKIPPED_COUNT"
|
||||
echo " 📝 总计: $((VALID_COUNT + SKIPPED_COUNT))"
|
||||
echo ""
|
||||
@@ -668,13 +668,15 @@ jobs:
|
||||
echo "🔄 版本 ${CHANGELOG_VERSION} 已存在,执行内容叠加..."
|
||||
|
||||
# 提取现有版本区域中的 commit hashes (用于去重)
|
||||
EXISTING_HASHES=$(awk '
|
||||
EXISTING_HASHES=$(awk -v version="${CHANGELOG_VERSION}" '
|
||||
BEGIN { in_version=0 }
|
||||
/^## :bookmark: '"${CHANGELOG_VERSION}"'$/ { in_version=1; next }
|
||||
/^## :bookmark: / && $0 ~ version"$" { in_version=1; next }
|
||||
/^## :bookmark: / && in_version { in_version=0 }
|
||||
in_version && /\(\[([0-9a-f]{7})\]/ {
|
||||
match($0, /\(\[([0-9a-f]{7})\]/, arr)
|
||||
print arr[1]
|
||||
in_version && /\(\[[0-9a-f]{7}\]/ {
|
||||
if (match($0, /\[([0-9a-f]{7})\]/)) {
|
||||
hash = substr($0, RSTART+1, RLENGTH-2)
|
||||
print hash
|
||||
}
|
||||
}
|
||||
' CHANGELOG.md | sort -u)
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ env:
|
||||
MIN_LINES_THRESHOLD: "10"
|
||||
|
||||
# ===== Git 配置 =====
|
||||
GIT_USER_NAME: "github-actions[bot]"
|
||||
GIT_USER_EMAIL: "github-actions[bot]@users.noreply.github.com"
|
||||
GIT_USER_NAME: "ci-bot"
|
||||
GIT_USER_EMAIL: "ci-bot@tinysoft.com.cn"
|
||||
|
||||
# ===== 平台配置 =====
|
||||
# 平台类型: github 或 gitea
|
||||
|
||||
@@ -1,5 +1,38 @@
|
||||
# CHANGELOG
|
||||
|
||||
## :bookmark: 0.0.3
|
||||
|
||||
### :pencil: What's Changed
|
||||
|
||||
- :bug: 移除默认上传`CHANGELOG.md` ([9961226](https://git.mytsl.cn/csh/actions-template/commit/99612267047e4d5c48d55888eeb0d05ba12c5da1)) by @csh
|
||||
- :recycle: 重构`changelog_and_release.yml` ([1f535e0](https://git.mytsl.cn/csh/actions-template/commit/1f535e0675efe166b5d38f0f0778f40d8663d318)) by @csh
|
||||
- :bug: 修复commit信息提取错误 ([bf6698a](https://git.mytsl.cn/csh/actions-template/commit/bf6698ab3e7f2020dcee899f6a06166b0e6a5168)) by @csh
|
||||
- 更新 CHANGELOG.md ([4ed8099](https://git.mytsl.cn/csh/actions-template/commit/4ed8099158f0f753b53a526ccba7dfc7aaad739a)) by @csh
|
||||
- :bug: fix bug ([fc76a1f](https://git.mytsl.cn/csh/actions-template/commit/fc76a1f625c4c6cb42e50cadb487b7607a8d2f0a)) by @csh
|
||||
- 更新 CHANGELOG.md [skip ci] ([7373553](https://git.mytsl.cn/csh/actions-template/commit/7373553270d20357a225aaf41334919086f7687d)) by @csh
|
||||
- :bug: fix bug ([fa21511](https://git.mytsl.cn/csh/actions-template/commit/fa21511d1ab98e415036046bc6950f8a3b322f25)) by @csh
|
||||
|
||||
|
||||
- :bug: 移除默认上传`CHANGELOG.md` ([9961226](https://git.mytsl.cn/csh/actions-template/commit/99612267047e4d5c48d55888eeb0d05ba12c5da1)) by @csh
|
||||
- :recycle: 重构`changelog_and_release.yml` ([1f535e0](https://git.mytsl.cn/csh/actions-template/commit/1f535e0675efe166b5d38f0f0778f40d8663d318)) by @csh
|
||||
- :bug: 修复commit信息提取错误 ([bf6698a](https://git.mytsl.cn/csh/actions-template/commit/bf6698ab3e7f2020dcee899f6a06166b0e6a5168)) by @csh
|
||||
- 更新 CHANGELOG.md ([4ed8099](https://git.mytsl.cn/csh/actions-template/commit/4ed8099158f0f753b53a526ccba7dfc7aaad739a)) by @csh
|
||||
- :bug: fix bug ([fc76a1f](https://git.mytsl.cn/csh/actions-template/commit/fc76a1f625c4c6cb42e50cadb487b7607a8d2f0a)) by @csh
|
||||
- :bug: fix bug ([fa21511](https://git.mytsl.cn/csh/actions-template/commit/fa21511d1ab98e415036046bc6950f8a3b322f25)) by @csh
|
||||
- :bug: 修复匹配正则问题 ([9a472a4](https://git.mytsl.cn/csh/actions-template/commit/9a472a42711746ecb739eee4475b4a4125c75312)) by @csh
|
||||
- :bug: 匹配逻辑 ([160c5eb](https://git.mytsl.cn/csh/actions-template/commit/160c5ebade5bf9e1a1e99412026ccd7d1cca6996)) by @csh
|
||||
- :bug: 修复过滤转义失败 ([e71d9d0](https://git.mytsl.cn/csh/actions-template/commit/e71d9d01fdbbd19c24dcf57382ec52fb42e228be)) by @csh
|
||||
- :bug: ok了嘛 ([3a17dc4](https://git.mytsl.cn/csh/actions-template/commit/3a17dc4b52163fbea3c2fe60c617acfe7d8cd19c)) by @csh
|
||||
- :bug: 不行就先放弃了 ([1b7eed5](https://git.mytsl.cn/csh/actions-template/commit/1b7eed5d93af889b7d8ed7d862899e36cbddaaf1)) by @csh
|
||||
|
||||
### :busts_in_silhouette: Contributors
|
||||
|
||||
<a href="https://git.mytsl.cn/csh">
|
||||
<img src="https://git.mytsl.cn/csh.png" alt="csh" width="35" height="35" style="border-radius: 50%;" onerror="this.src='https://git.mytsl.cn/assets/img/avatar_default.png'" />
|
||||
</a>
|
||||
|
||||
---
|
||||
|
||||
## :bookmark: 0.0.2
|
||||
|
||||
*Released on 2025-11-02*
|
||||
|
||||
@@ -3,6 +3,7 @@ services:
|
||||
build: .
|
||||
container_name: gitea-runner
|
||||
restart: unless-stopped
|
||||
network_mode: "host" # 使用宿主机网络
|
||||
privileged: true
|
||||
volumes:
|
||||
- ./runner-data:/data
|
||||
@@ -17,10 +18,10 @@ services:
|
||||
|
||||
# 如果需要使用代理,取消下面的注释并修改为你的代理地址
|
||||
# 注意:容器内访问宿主机需要使用 host.docker.internal 或宿主机IP
|
||||
- http_proxy=http://host.docker.internal:20122
|
||||
- https_proxy=http://host.docker.internal:20122
|
||||
- HTTP_PROXY=http://host.docker.internal:20122
|
||||
- HTTPS_PROXY=http://host.docker.internal:20122
|
||||
# - http_proxy=http://host.docker.internal:20122
|
||||
# - https_proxy=http://host.docker.internal:20122
|
||||
# - HTTP_PROXY=http://host.docker.internal:20122
|
||||
# - HTTPS_PROXY=http://host.docker.internal:20122
|
||||
# - no_proxy=localhost,127.0.0.1
|
||||
|
||||
# Linux 系统需要取消下面的注释以支持 host.docker.internal
|
||||
|
||||
@@ -47,7 +47,7 @@ RUNNER_NAME=${RUNNER_NAME:-docker-runner}
|
||||
|
||||
# 多个 label(逗号分隔,无空格)
|
||||
# ubuntu-22.04:host://ubuntu:22.04,ubuntu-20.04:host://ubuntu:20.04,node:docker://node:18
|
||||
read -p "Enter runner labels (default: ubuntu-22.04:docker://ubuntu:22.04): " RUNNER_LABELS
|
||||
read -p "Enter runner labels (default: ubuntu-22.04:host://ubuntu:22.04): " RUNNER_LABELS
|
||||
RUNNER_LABELS=${RUNNER_LABELS:-ubuntu-22.04:host://ubuntu:22.04}
|
||||
|
||||
# 创建 runner 目录
|
||||
|
||||
@@ -3,6 +3,7 @@ services:
|
||||
build: .
|
||||
container_name: gitea-runner
|
||||
restart: unless-stopped
|
||||
network_mode: "host" # 使用宿主机网络
|
||||
volumes:
|
||||
- ./runner-data:/data
|
||||
- ./setup.sh:/data/setup.sh:ro
|
||||
@@ -16,15 +17,13 @@ services:
|
||||
|
||||
# 如果需要使用代理,取消下面的注释并修改为你的代理地址
|
||||
# 注意:容器内访问宿主机需要使用 host.docker.internal 或宿主机IP
|
||||
- http_proxy=http://host.docker.internal:20122
|
||||
- https_proxy=http://host.docker.internal:20122
|
||||
- HTTP_PROXY=http://host.docker.internal:20122
|
||||
- HTTPS_PROXY=http://host.docker.internal:20122
|
||||
# - http_proxy=http://host.docker.internal:20122
|
||||
# - https_proxy=http://host.docker.internal:20122
|
||||
# - HTTP_PROXY=http://host.docker.internal:20122
|
||||
# - HTTPS_PROXY=http://host.docker.internal:20122
|
||||
# - no_proxy=localhost,127.0.0.1
|
||||
|
||||
# Linux 系统需要取消下面的注释以支持 host.docker.internal
|
||||
# extra_hosts:
|
||||
# - "host.docker.internal:host-gateway"
|
||||
|
||||
# 如果需要使用主机网络,取消下面的注释
|
||||
# network_mode: host
|
||||
|
||||
@@ -47,7 +47,7 @@ RUNNER_NAME=${RUNNER_NAME:-docker-runner}
|
||||
|
||||
# 多个 label(逗号分隔,无空格)
|
||||
# ubuntu-22.04:host://ubuntu:22.04,ubuntu-20.04:host://ubuntu:20.04,node:docker://node:18
|
||||
read -p "Enter runner labels (default: ubuntu-22.04:docker://ubuntu:22.04): " RUNNER_LABELS
|
||||
read -p "Enter runner labels (default: ubuntu-22.04:host://ubuntu:22.04): " RUNNER_LABELS
|
||||
RUNNER_LABELS=${RUNNER_LABELS:-ubuntu-22.04:host://ubuntu:22.04}
|
||||
|
||||
# 创建 runner 目录
|
||||
|
||||
Reference in New Issue
Block a user