mirror of
https://github.com/Smile-QWQ/SubTracker.git
synced 2026-05-07 07:37:19 +08:00
chore: make worker deploy default to short commit version
- update Deploy to Cloudflare workflow so Worker Lite defaults to the current deployment commit short sha when app_version is not provided - keep manual app_version override support for explicit releases - update README and DEPLOYMENT docs to match the new version fallback rule
This commit is contained in:
7
.github/workflows/cf-worker-deploy.yml
vendored
7
.github/workflows/cf-worker-deploy.yml
vendored
@@ -52,12 +52,7 @@ jobs:
|
||||
exit 0
|
||||
fi
|
||||
|
||||
TAG_VALUE="$(git describe --tags --abbrev=0 2>/dev/null || true)"
|
||||
if [ -n "$TAG_VALUE" ]; then
|
||||
echo "value=$TAG_VALUE" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "value=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
echo "value=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Resolve deploy options
|
||||
id: deploy_options
|
||||
|
||||
@@ -71,6 +71,8 @@ npm run deploy:worker
|
||||
|
||||
默认域名前缀是 `subtracker`。
|
||||
|
||||
如果 `app_version` 留空,workflow 会自动使用当前部署 commit 的短 hash 作为版本号。
|
||||
|
||||
## 5. 后续更新
|
||||
|
||||
后续使用 GitHub 的 **Sync fork** 同步上游代码后,会自动触发部署 workflow。
|
||||
|
||||
Reference in New Issue
Block a user