diff --git a/.github/workflows/verify-group-version.yml b/.github/workflows/verify-group-version.yml new file mode 100644 index 000000000..30cfbfe8a --- /dev/null +++ b/.github/workflows/verify-group-version.yml @@ -0,0 +1,226 @@ +name: Verify group version + +on: workflow_call + +permissions: + contents: read + pull-requests: read + statuses: write + +jobs: + verify: + name: Verify group version + runs-on: ubuntu-latest + concurrency: + group: group-version-guard-${{ github.event.pull_request.head.sha }} + cancel-in-progress: false + env: + GH_TOKEN: ${{ github.token }} + PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} + steps: + - name: Mark version check pending + run: | + gh api "repos/$GITHUB_REPOSITORY/statuses/$PR_HEAD_SHA" --method POST \ + -f state=pending -f context=group-version-guard \ + -f description='正在检查成员版本与本轮发布记录' \ + -f target_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" > /dev/null + + - name: Install deps + run: pip install --quiet pyyaml + + - name: Verify changelog version + id: verify + run: | + python3 - <<'PY' + import base64 + import json + import os + import re + import subprocess + import tempfile + from pathlib import Path + from urllib.parse import urlencode + + import yaml + + MARKER = "", 1)[0]) + if release["group"] != group or [p["sha"] for p in commit["parents"]] != [release["base_sha"]]: + raise RuntimeError("DDE 发布记录已改变,请先修复原基线 PR") + return release + if hops == 100 or len(commit["parents"]) != 2: + break + commit = api(f"repos/{repo}/git/commits/{commit['parents'][0]['sha']}") + raise RuntimeError("DDE 基线 PR 缺少原始发布记录,请先核实") + + def check(repo, pr): + before = head_version(repo, pr["base"]["sha"]) + source = pr["head"]["repo"] + if not source: + raise RuntimeError("PR 来源仓库已删除,无法校验") + after = head_version(source["full_name"], pr["head"]["sha"]) + if before == after: + return "changelog 版本未变化" + if subprocess.run(["dpkg", "--compare-versions", after, "gt", before]).returncode: + raise RuntimeError(f"成员版本只能升版: {before} -> {after}") + + owner = repo.split("/", 1)[0] + baseline = f"{owner}/dde" + default = api(f"repos/{baseline}")["default_branch"] + cfg = yaml.safe_load(content(baseline, "groups.yaml", default)) + groups = [g for g in cfg["groups"] if repo in repo_names(cfg, g, owner)] + if len(groups) != 1: + raise RuntimeError(f"{repo} 不属于唯一的 DDE 版本组,请核实分组配置") + group = groups[0] + query = urlencode({"state": "all", "head": f"{owner}:baseline/{group}", + "sort": "created", "direction": "desc", "per_page": 1}) + prs = api(f"repos/{baseline}/pulls?{query}") + if not prs: + raise RuntimeError(f"{group} 没有统一发布记录,请从 DDE Release group 发起,不能单独改版") + baseline_pr = prs[0] + if (not baseline_pr["head"]["repo"] or baseline_pr["head"]["repo"]["full_name"] != baseline + or baseline_pr["head"]["ref"] != f"baseline/{group}" + or baseline_pr["base"]["ref"] != default): + raise RuntimeError("DDE 基线 PR 的来源或目标分支不符") + release = release_record(baseline, baseline_pr["head"]["sha"], group) + if (release["base_branch"] != default + or [m["repo"] for m in release["members"]] != repo_names(cfg, group, owner)): + raise RuntimeError("DDE 本轮成员或目标分支已改变,请先核实原发布") + member = next(m for m in release["members"] if m["repo"] == repo) + baseline_version = cfg["groups"][group]["version"] + if "version" in member: + baseline_version = baseline_version.split(":", 1)[-1] + if subprocess.run(["dpkg", "--compare-versions", release["version"], "ge", baseline_version]).returncode: + raise RuntimeError("DDE 发布记录已过期,不能继续旧版本") + target = member.get("version", release["version"]) + if subprocess.run(["dpkg", "--validate-version", target]).returncode: + raise RuntimeError(f"无效成员目标版本: {target}") + if "version" in member and target.split(":", 1)[-1] != release["version"]: + raise RuntimeError("成员目标版本与组版本不符") + safe = re.sub(r"[^A-Za-z0-9._-]+", "-", target).strip("-") + branch = f"release-{target}" if group == "G1" else f"automation/update-changelog/{safe}" + if (after != target or source["full_name"] != repo or pr["head"]["ref"] != branch + or pr["base"]["ref"] != member["base"] or pr["created_at"] < release["started_at"]): + raise RuntimeError(f"{repo} 的改版 PR 不属于 {group} 本轮 {target},请从 DDE Release group 发起") + return f"{group} 本轮发布 {target},成员 PR 与发布记录一致" + + def identity(pr): + source = pr["head"]["repo"] or {} + return {"number": pr["number"], "head_sha": pr["head"]["sha"], + "head_repo": source.get("full_name"), "head_ref": pr["head"]["ref"], + "base_ref": pr["base"]["ref"]} + + def main(): + repo = os.environ["GITHUB_REPOSITORY"] + with open(os.environ["GITHUB_EVENT_PATH"], encoding="utf-8") as f: + event = json.load(f) + pr = api(f"repos/{repo}/pulls/{event['number']}") + if pr["head"]["sha"] != os.environ["PR_HEAD_SHA"]: + raise RuntimeError("PR 提交已变化,请等待新提交的检查") + query = urlencode({"state": "open", "per_page": 100}) + related = api(f"repos/{repo}/pulls?{query}", paginate=True) + open_prs = [p for p in related + if p["state"] == "open" and p["head"]["sha"] == os.environ["PR_HEAD_SHA"]] + if not any(p["number"] == pr["number"] for p in open_prs) and pr["state"] == "open": + open_prs.append(pr) + for item in open_prs: + check(repo, item) + Path(os.environ["RUNNER_TEMP"], "verified-prs.json").write_text( + json.dumps(sorted((identity(pr) for pr in open_prs), key=lambda pr: pr["number"])) + "\n", + encoding="utf-8") + print(f"同提交开放 PR 校验通过: {len(open_prs)}") + + if __name__ == "__main__": + main() + PY + + - name: Publish version check result + if: always() + env: + VERIFY_OUTCOME: ${{ steps.verify.outcome }} + run: | + set -euo pipefail + current_state=success + if [ "$VERIFY_OUTCOME" != "success" ]; then + current_state=failure + fi + if [ "$current_state" = success ]; then + if ! gh api "repos/$GITHUB_REPOSITORY/pulls?state=open&per_page=100" --paginate --slurp \ + > "$RUNNER_TEMP/current-prs.json"; then + echo '::error::无法刷新关联 PR,成员版本校验不能通过' >&2 + current_state=failure + elif ! python3 - "$RUNNER_TEMP/verified-prs.json" "$RUNNER_TEMP/current-prs.json" "$PR_HEAD_SHA" <<'PY' + import json + import sys + + expected_file, current_file, head_sha = sys.argv[1:] + with open(expected_file, encoding="utf-8") as f: + expected = json.load(f) + with open(current_file, encoding="utf-8") as f: + pages = json.load(f) + if pages and isinstance(pages[0], dict): + pages = [pages] + current = [item for page in pages for item in page] + + def identity(pr): + source = pr["head"]["repo"] or {} + return {"number": pr["number"], "head_sha": pr["head"]["sha"], + "head_repo": source.get("full_name"), "head_ref": pr["head"]["ref"], + "base_ref": pr["base"]["ref"]} + + current = sorted((identity(pr) for pr in current + if pr["state"] == "open" and pr["head"]["sha"] == head_sha), + key=lambda pr: pr["number"]) + if current != expected: + print("::error::校验期间 PR 的目标、提交或开放集合发生变化,需要重新检查", file=sys.stderr) + raise SystemExit(1) + PY + then + current_state=failure + fi + fi + if [ "$current_state" = "success" ]; then + state=success + description='成员版本校验通过' + else + state=failure + description='成员版本校验失败,详见工作流日志' + fi + gh api "repos/$GITHUB_REPOSITORY/statuses/$PR_HEAD_SHA" --method POST \ + -f state="$state" -f context=group-version-guard \ + -f description="$description" \ + -f target_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" > /dev/null + test "$current_state" = success diff --git a/README.md b/README.md index 91d8d5d2d..c277fc49f 100644 --- a/README.md +++ b/README.md @@ -39,3 +39,29 @@ commit信息检查 ### cppcheck cpp代码静态检查 + +### call-verify-group-version + +校验 DDE 组成员 PR 的 `debian/changelog` 版本。普通代码 PR 不改版本时通过;改版 PR 须匹配 +同组织 `dde` 仓库的原始发布记录,包括完整成员目标版本、成员仓库、自动化分支、目标分支和 PR 创建时间。 +组目标不带 epoch;G2 成员保留现有 epoch,去掉 epoch 后须与组目标一致。 +首轮成员起始版本可以不同,完整目标仍须高于当前版本。 +缺少成员版本字段的旧记录继续按原组目标校验,不改变已有发布。 +旧 epoch 组基线完成后,新记录按不带 epoch 的组版本判断是否过期,成员仍校验完整目标。 + +成员使用 `workflow-templates/call-verify-group-version.yml`,通过 `pull_request_target` 调用 +`verify-group-version.yml`。工作流只读取 PR 文件,不检出或执行 PR 代码;使用本仓库的 +`GITHUB_TOKEN` 把 `group-version-guard` 状态写到 PR 的 head 提交,不需要 GitHub App Secret。 + +`repos/linuxdeepin/*.json` 已为 25 个组成员配置此模板。dtk6log 已归档,其模板同步配置停用。 +上线前先完成成员首用准备,包括 go-lib 的发布入口;合入共享工作流和模板配置, +确认成员入口安装完成后上线 DDE 协调器。带 epoch 的新发布须等协调器与成员校验均更新后触发。 +默认分支上的入口文件接入后,给所有成员发布目标分支 +启用 `group-version-guard` 必需检查,来源选择 GitHub Actions;同时要求 PR、分支保持最新, +禁止直接推送、强推和绕过。工作流本身不能阻止未受保护分支上的直接推送。 + +成员启用保护后,后续模板更新须通过 PR 合入;自动创建模板 PR 的工具升级另行安排,也可手工创建 PR。 +模板同步和发布机器人均不配置保护绕过。 +最终关联 PR 列表或 PR 状态查询失败时,guard 发布失败状态,工作流同时失败;不会沿用之前的成功结果。 +版本校验后会保存 PR 的提交、来源和目标分支;发布成功状态前再次核对开放 PR 集合和这些身份。 +校验期间改投目标或出现其他 PR 变化时,本次结果写为失败,等待新事件重新检查。 diff --git a/repos/linuxdeepin/dde-api.json b/repos/linuxdeepin/dde-api.json index 2ee61ffee..36a3eba72 100644 --- a/repos/linuxdeepin/dde-api.json +++ b/repos/linuxdeepin/dde-api.json @@ -74,5 +74,12 @@ ], "src": "workflow-templates/call-update-changelog.yml", "dest": "linuxdeepin/dde-api/.github/workflows/call-update-changelog.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dde-api/.github/workflows/call-verify-group-version.yml" } -] \ No newline at end of file +] diff --git a/repos/linuxdeepin/dde-appearance.json b/repos/linuxdeepin/dde-appearance.json index f27b7ae50..31d1241ec 100644 --- a/repos/linuxdeepin/dde-appearance.json +++ b/repos/linuxdeepin/dde-appearance.json @@ -64,5 +64,12 @@ ], "src": "workflow-templates/call-update-changelog.yml", "dest": "linuxdeepin/dde-appearance/.github/workflows/call-update-changelog.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dde-appearance/.github/workflows/call-verify-group-version.yml" } -] \ No newline at end of file +] diff --git a/repos/linuxdeepin/dde-application-manager.json b/repos/linuxdeepin/dde-application-manager.json index 2b405f507..9945a332f 100644 --- a/repos/linuxdeepin/dde-application-manager.json +++ b/repos/linuxdeepin/dde-application-manager.json @@ -64,5 +64,12 @@ ], "src": "workflow-templates/call-update-changelog.yml", "dest": "linuxdeepin/dde-application-manager/.github/workflows/call-update-changelog.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dde-application-manager/.github/workflows/call-verify-group-version.yml" } -] \ No newline at end of file +] diff --git a/repos/linuxdeepin/dde-control-center.json b/repos/linuxdeepin/dde-control-center.json index 11d9bf262..7aa19ea42 100644 --- a/repos/linuxdeepin/dde-control-center.json +++ b/repos/linuxdeepin/dde-control-center.json @@ -90,5 +90,12 @@ ], "src": "workflow-templates/call-update-changelog.yml", "dest": "linuxdeepin/dde-control-center/.github/workflows/call-update-changelog.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dde-control-center/.github/workflows/call-verify-group-version.yml" } ] diff --git a/repos/linuxdeepin/dde-daemon.json b/repos/linuxdeepin/dde-daemon.json index 60eb8bd77..3685d2b55 100644 --- a/repos/linuxdeepin/dde-daemon.json +++ b/repos/linuxdeepin/dde-daemon.json @@ -74,5 +74,12 @@ ], "src": "workflow-templates/call-update-changelog.yml", "dest": "linuxdeepin/dde-daemon/.github/workflows/call-update-changelog.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dde-daemon/.github/workflows/call-verify-group-version.yml" } -] \ No newline at end of file +] diff --git a/repos/linuxdeepin/dde-launchpad.json b/repos/linuxdeepin/dde-launchpad.json index 3388295cf..08ed4b0e8 100644 --- a/repos/linuxdeepin/dde-launchpad.json +++ b/repos/linuxdeepin/dde-launchpad.json @@ -76,5 +76,12 @@ ], "src": "workflow-templates/call-update-changelog.yml", "dest": "linuxdeepin/dde-launchpad/.github/workflows/call-update-changelog.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dde-launchpad/.github/workflows/call-verify-group-version.yml" } -] \ No newline at end of file +] diff --git a/repos/linuxdeepin/dde-network-core.json b/repos/linuxdeepin/dde-network-core.json index 2aa00a4f1..e66610d6c 100644 --- a/repos/linuxdeepin/dde-network-core.json +++ b/repos/linuxdeepin/dde-network-core.json @@ -95,5 +95,12 @@ ], "src": "workflow-templates/call-update-changelog.yml", "dest": "linuxdeepin/dde-network-core/.github/workflows/call-update-changelog.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dde-network-core/.github/workflows/call-verify-group-version.yml" } -] \ No newline at end of file +] diff --git a/repos/linuxdeepin/qt5integration.json b/repos/linuxdeepin/dde-qtintegration.json similarity index 53% rename from repos/linuxdeepin/qt5integration.json rename to repos/linuxdeepin/dde-qtintegration.json index d76f9da20..92e42a7cf 100644 --- a/repos/linuxdeepin/qt5integration.json +++ b/repos/linuxdeepin/dde-qtintegration.json @@ -4,28 +4,28 @@ "master" ], "src": "workflow-templates/backup-to-gitlab.yml", - "dest": "linuxdeepin/qt5integration/.github/workflows/backup-to-gitlab.yml" + "dest": "linuxdeepin/dde-qtintegration/.github/workflows/backup-to-gitlab.yml" }, { "branches": [ "master" ], "src": "workflow-templates/call-commitlint.yml", - "dest": "linuxdeepin/qt5integration/.github/workflows/call-commitlint.yml" + "dest": "linuxdeepin/dde-qtintegration/.github/workflows/call-commitlint.yml" }, { "branches": [ "master" ], "src": "workflow-templates/call-chatOps.yml", - "dest": "linuxdeepin/qt5integration/.github/workflows/call-chatOps.yml" + "dest": "linuxdeepin/dde-qtintegration/.github/workflows/call-chatOps.yml" }, { "branches": [ "master" ], "src": "workflow-templates/cppcheck.yml", - "dest": "linuxdeepin/qt5integration/.github/workflows/cppcheck.yml" + "dest": "linuxdeepin/dde-qtintegration/.github/workflows/cppcheck.yml" }, { "branches": [ @@ -35,35 +35,35 @@ "deletelist": [ ".github/workflows/call-build-deb.yml" ], - "dest": "linuxdeepin/qt5integration/.github/workflows/call-build-deb.yml" + "dest": "linuxdeepin/dde-qtintegration/.github/workflows/call-build-deb.yml" }, { "branches": [ "master" ], "src": "workflow-templates/call-build-distribution.yml", - "dest": "linuxdeepin/qt5integration/.github/workflows/call-build-distribution.yml" + "dest": "linuxdeepin/dde-qtintegration/.github/workflows/call-build-distribution.yml" }, { "branch": [ "master" ], "src": "workflow-templates/call-clacheck.yml", - "dest": "linuxdeepin/qt5integration/.github/workflows/call-clacheck.yml" + "dest": "linuxdeepin/dde-qtintegration/.github/workflows/call-clacheck.yml" }, { "branches": [ "master" ], "src": "workflow-templates/call-license-check.yml", - "dest": "linuxdeepin/qt5integration/.github/workflows/call-license-check.yml" + "dest": "linuxdeepin/dde-qtintegration/.github/workflows/call-license-check.yml" }, { "branch": [ "master" ], "src": "workflow-templates/call-auto-tag.yml", - "dest": "linuxdeepin/qt5integration/.github/workflows/call-auto-tag.yml" + "dest": "linuxdeepin/dde-qtintegration/.github/workflows/call-auto-tag.yml" }, { "branch": [ @@ -73,13 +73,20 @@ "deletelist": [ ".github/workflows/call-tag-build.yml" ], - "dest": "linuxdeepin/qt5integration/.github/workflows/call-tag-build.yml" + "dest": "linuxdeepin/dde-qtintegration/.github/workflows/call-tag-build.yml" }, { "branch": [ "master" ], "src": "issue-templates/dtk-config.yml", - "dest": "linuxdeepin/qt5integration/.github/ISSUE_TEMPLATE/config.yml" + "dest": "linuxdeepin/dde-qtintegration/.github/ISSUE_TEMPLATE/config.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dde-qtintegration/.github/workflows/call-verify-group-version.yml" } ] diff --git a/repos/linuxdeepin/qt5platform-plugins.json b/repos/linuxdeepin/dde-qtplatform-plugins.json similarity index 51% rename from repos/linuxdeepin/qt5platform-plugins.json rename to repos/linuxdeepin/dde-qtplatform-plugins.json index 45174b002..d811e3607 100644 --- a/repos/linuxdeepin/qt5platform-plugins.json +++ b/repos/linuxdeepin/dde-qtplatform-plugins.json @@ -4,28 +4,28 @@ "master" ], "src": "workflow-templates/backup-to-gitlab.yml", - "dest": "linuxdeepin/qt5platform-plugins/.github/workflows/backup-to-gitlab.yml" + "dest": "linuxdeepin/dde-qtplatform-plugins/.github/workflows/backup-to-gitlab.yml" }, { "branches": [ "master" ], "src": "workflow-templates/call-commitlint.yml", - "dest": "linuxdeepin/qt5platform-plugins/.github/workflows/call-commitlint.yml" + "dest": "linuxdeepin/dde-qtplatform-plugins/.github/workflows/call-commitlint.yml" }, { "branches": [ "master" ], "src": "workflow-templates/call-chatOps.yml", - "dest": "linuxdeepin/qt5platform-plugins/.github/workflows/call-chatOps.yml" + "dest": "linuxdeepin/dde-qtplatform-plugins/.github/workflows/call-chatOps.yml" }, { "branches": [ "master" ], "src": "workflow-templates/cppcheck.yml", - "dest": "linuxdeepin/qt5platform-plugins/.github/workflows/cppcheck.yml" + "dest": "linuxdeepin/dde-qtplatform-plugins/.github/workflows/cppcheck.yml" }, { "branches": [ @@ -35,35 +35,35 @@ "deletelist": [ ".github/workflows/call-build-deb.yml" ], - "dest": "linuxdeepin/qt5platform-plugins/.github/workflows/call-build-deb.yml" + "dest": "linuxdeepin/dde-qtplatform-plugins/.github/workflows/call-build-deb.yml" }, { "branches": [ "master" ], "src": "workflow-templates/call-build-distribution.yml", - "dest": "linuxdeepin/qt5platform-plugins/.github/workflows/call-build-distribution.yml" + "dest": "linuxdeepin/dde-qtplatform-plugins/.github/workflows/call-build-distribution.yml" }, { "branch": [ "master" ], "src": "workflow-templates/call-clacheck.yml", - "dest": "linuxdeepin/qt5platform-plugins/.github/workflows/call-clacheck.yml" + "dest": "linuxdeepin/dde-qtplatform-plugins/.github/workflows/call-clacheck.yml" }, { "branches": [ "master" ], "src": "workflow-templates/call-license-check.yml", - "dest": "linuxdeepin/qt5platform-plugins/.github/workflows/call-license-check.yml" + "dest": "linuxdeepin/dde-qtplatform-plugins/.github/workflows/call-license-check.yml" }, { "branch": [ "master" ], "src": "workflow-templates/call-auto-tag.yml", - "dest": "linuxdeepin/qt5platform-plugins/.github/workflows/call-auto-tag.yml" + "dest": "linuxdeepin/dde-qtplatform-plugins/.github/workflows/call-auto-tag.yml" }, { "branch": [ @@ -73,13 +73,20 @@ "deletelist": [ ".github/workflows/call-tag-build.yml" ], - "dest": "linuxdeepin/qt5platform-plugins/.github/workflows/call-tag-build.yml" + "dest": "linuxdeepin/dde-qtplatform-plugins/.github/workflows/call-tag-build.yml" }, { "branch": [ "master" ], "src": "issue-templates/dtk-config.yml", - "dest": "linuxdeepin/qt5platform-plugins/.github/ISSUE_TEMPLATE/config.yml" + "dest": "linuxdeepin/dde-qtplatform-plugins/.github/ISSUE_TEMPLATE/config.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dde-qtplatform-plugins/.github/workflows/call-verify-group-version.yml" } ] diff --git a/repos/linuxdeepin/dde-services.json b/repos/linuxdeepin/dde-services.json index 8ea00b78b..42b291439 100644 --- a/repos/linuxdeepin/dde-services.json +++ b/repos/linuxdeepin/dde-services.json @@ -5,5 +5,12 @@ ], "src": "workflow-templates/call-update-changelog.yml", "dest": "linuxdeepin/dde-services/.github/workflows/call-update-changelog.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dde-services/.github/workflows/call-verify-group-version.yml" } ] diff --git a/repos/linuxdeepin/dde-session-shell-snipe.json b/repos/linuxdeepin/dde-session-shell-snipe.json index b4a0aa700..bf6fbeb3d 100644 --- a/repos/linuxdeepin/dde-session-shell-snipe.json +++ b/repos/linuxdeepin/dde-session-shell-snipe.json @@ -5,5 +5,12 @@ ], "src": "workflow-templates/call-update-changelog.yml", "dest": "linuxdeepin/dde-session-shell-snipe/.github/workflows/call-update-changelog.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dde-session-shell-snipe/.github/workflows/call-verify-group-version.yml" } ] diff --git a/repos/linuxdeepin/dde-session.json b/repos/linuxdeepin/dde-session.json index 8259cad69..80d192d93 100644 --- a/repos/linuxdeepin/dde-session.json +++ b/repos/linuxdeepin/dde-session.json @@ -64,5 +64,12 @@ ], "src": "workflow-templates/call-update-changelog.yml", "dest": "linuxdeepin/dde-session/.github/workflows/call-update-changelog.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dde-session/.github/workflows/call-verify-group-version.yml" } -] \ No newline at end of file +] diff --git a/repos/linuxdeepin/dde-shell.json b/repos/linuxdeepin/dde-shell.json index 7dbb99242..48a8f132a 100644 --- a/repos/linuxdeepin/dde-shell.json +++ b/repos/linuxdeepin/dde-shell.json @@ -76,5 +76,12 @@ ], "src": "workflow-templates/call-update-changelog.yml", "dest": "linuxdeepin/dde-shell/.github/workflows/call-update-changelog.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dde-shell/.github/workflows/call-verify-group-version.yml" } -] \ No newline at end of file +] diff --git a/repos/linuxdeepin/dde-tray-loader.json b/repos/linuxdeepin/dde-tray-loader.json index 403d8c4e8..b8a5a6c56 100644 --- a/repos/linuxdeepin/dde-tray-loader.json +++ b/repos/linuxdeepin/dde-tray-loader.json @@ -57,5 +57,12 @@ ], "src": "workflow-templates/call-update-changelog.yml", "dest": "linuxdeepin/dde-tray-loader/.github/workflows/call-update-changelog.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dde-tray-loader/.github/workflows/call-verify-group-version.yml" } ] diff --git a/repos/linuxdeepin/deepin-service-manager.json b/repos/linuxdeepin/deepin-service-manager.json index 0cedbffbe..4092839a5 100644 --- a/repos/linuxdeepin/deepin-service-manager.json +++ b/repos/linuxdeepin/deepin-service-manager.json @@ -89,5 +89,12 @@ ], "src": "workflow-templates/call-update-changelog.yml", "dest": "linuxdeepin/deepin-service-manager/.github/workflows/call-update-changelog.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/deepin-service-manager/.github/workflows/call-verify-group-version.yml" } -] \ No newline at end of file +] diff --git a/repos/linuxdeepin/deepin-update-ui.json b/repos/linuxdeepin/deepin-update-ui.json index 6bf535352..2e14657bc 100644 --- a/repos/linuxdeepin/deepin-update-ui.json +++ b/repos/linuxdeepin/deepin-update-ui.json @@ -67,5 +67,12 @@ ], "src": "workflow-templates/call-update-changelog.yml", "dest": "linuxdeepin/deepin-update-ui/.github/workflows/call-update-changelog.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/deepin-update-ui/.github/workflows/call-verify-group-version.yml" } ] diff --git a/repos/linuxdeepin/dtkcommon.json b/repos/linuxdeepin/dtkcommon.json index 335da4d35..30b4bee58 100644 --- a/repos/linuxdeepin/dtkcommon.json +++ b/repos/linuxdeepin/dtkcommon.json @@ -74,5 +74,12 @@ ], "src": "issue-templates/dtk-config.yml", "dest": "linuxdeepin/dtkcommon/.github/ISSUE_TEMPLATE/config.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dtkcommon/.github/workflows/call-verify-group-version.yml" } ] diff --git a/repos/linuxdeepin/dtkcore.json b/repos/linuxdeepin/dtkcore.json index 055dbc4fa..6f0e3d9a3 100644 --- a/repos/linuxdeepin/dtkcore.json +++ b/repos/linuxdeepin/dtkcore.json @@ -113,5 +113,12 @@ ".github/ISSUE_TEMPLATE/unit-test-report.md" ], "dest": "linuxdeepin/dtkcore/.github/ISSUE_TEMPLATE/config.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dtkcore/.github/workflows/call-verify-group-version.yml" } ] diff --git a/repos/linuxdeepin/dtkdeclarative.json b/repos/linuxdeepin/dtkdeclarative.json index 3ae101af6..03af1795a 100644 --- a/repos/linuxdeepin/dtkdeclarative.json +++ b/repos/linuxdeepin/dtkdeclarative.json @@ -113,5 +113,12 @@ ".github/ISSUE_TEMPLATE/unit-test-report.md" ], "dest": "linuxdeepin/dtkdeclarative/.github/ISSUE_TEMPLATE/config.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dtkdeclarative/.github/workflows/call-verify-group-version.yml" } ] diff --git a/repos/linuxdeepin/dtkgui.json b/repos/linuxdeepin/dtkgui.json index 144f61dde..009a47258 100644 --- a/repos/linuxdeepin/dtkgui.json +++ b/repos/linuxdeepin/dtkgui.json @@ -113,5 +113,12 @@ ".github/ISSUE_TEMPLATE/unit-test-report.md" ], "dest": "linuxdeepin/dtkgui/.github/ISSUE_TEMPLATE/config.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dtkgui/.github/workflows/call-verify-group-version.yml" } ] diff --git a/repos/linuxdeepin/dtklog.json b/repos/linuxdeepin/dtklog.json index 4a5244f8b..25e03bd88 100644 --- a/repos/linuxdeepin/dtklog.json +++ b/repos/linuxdeepin/dtklog.json @@ -68,5 +68,12 @@ ], "src": "issue-templates/unit-test-report.md", "dest": "linuxdeepin/dtklog/.github/ISSUE_TEMPLATE/unit-test-report.md" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dtklog/.github/workflows/call-verify-group-version.yml" } ] diff --git a/repos/linuxdeepin/dtkwidget.json b/repos/linuxdeepin/dtkwidget.json index e9adab332..71829beb2 100644 --- a/repos/linuxdeepin/dtkwidget.json +++ b/repos/linuxdeepin/dtkwidget.json @@ -113,5 +113,12 @@ ".github/ISSUE_TEMPLATE/unit-test-report.md" ], "dest": "linuxdeepin/dtkwidget/.github/ISSUE_TEMPLATE/config.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/dtkwidget/.github/workflows/call-verify-group-version.yml" } ] diff --git a/repos/linuxdeepin/go-dbus-factory.json b/repos/linuxdeepin/go-dbus-factory.json index 80b2b91ae..8498ac6ec 100644 --- a/repos/linuxdeepin/go-dbus-factory.json +++ b/repos/linuxdeepin/go-dbus-factory.json @@ -74,5 +74,12 @@ ".github/workflows/call-tag-build.yml" ], "dest": "linuxdeepin/go-dbus-factory/.github/workflows/call-tag-build.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/go-dbus-factory/.github/workflows/call-verify-group-version.yml" } -] \ No newline at end of file +] diff --git a/repos/linuxdeepin/go-lib.json b/repos/linuxdeepin/go-lib.json index 575f7aa09..1ee1b4db0 100644 --- a/repos/linuxdeepin/go-lib.json +++ b/repos/linuxdeepin/go-lib.json @@ -74,5 +74,12 @@ ], "src": "workflow-templates/call-update-changelog.yml", "dest": "linuxdeepin/go-lib/.github/workflows/call-update-changelog.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/go-lib/.github/workflows/call-verify-group-version.yml" } ] diff --git a/repos/linuxdeepin/xdg-desktop-portal-dde.json b/repos/linuxdeepin/xdg-desktop-portal-dde.json index 05e88bb8b..dc62acbaf 100644 --- a/repos/linuxdeepin/xdg-desktop-portal-dde.json +++ b/repos/linuxdeepin/xdg-desktop-portal-dde.json @@ -64,5 +64,12 @@ ], "src": "workflow-templates/call-update-changelog.yml", "dest": "linuxdeepin/xdg-desktop-portal-dde/.github/workflows/call-update-changelog.yml" + }, + { + "branches": [ + "master" + ], + "src": "workflow-templates/call-verify-group-version.yml", + "dest": "linuxdeepin/xdg-desktop-portal-dde/.github/workflows/call-verify-group-version.yml" } ] diff --git a/workflow-templates/call-verify-group-version.yml b/workflow-templates/call-verify-group-version.yml new file mode 100644 index 000000000..1ccd0603b --- /dev/null +++ b/workflow-templates/call-verify-group-version.yml @@ -0,0 +1,14 @@ +name: Verify group version + +on: + pull_request_target: + types: [opened, reopened, synchronize, edited, ready_for_review, closed] + +permissions: + contents: read + pull-requests: read + statuses: write + +jobs: + verify: + uses: linuxdeepin/.github/.github/workflows/verify-group-version.yml@master