ci: leave tag protection review with the maintainer
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/push/ci Pipeline is pending

This commit was merged in pull request #8.
This commit is contained in:
cflmy committed 2026-11-27 21:26:13 +08:00
1 parent c03a8d9d98
commit ecf23d0507
2 files changed
+6 -9

No files matched your search

+6 -5
View File
@@ -55,12 +55,13 @@ python3 tools/release/publish-gitea.py --prepare \
--tag "$release_tag" --pipeline "$component_pipeline" --archive "$archive" --tag "$release_tag" --pipeline "$component_pipeline" --archive "$archive"
``` ```
The approved publisher runs the same command with `--body-file` in place of The maintainer verifies Gitea tag protection as part of release approval. The
approved publisher runs the same command with `--body-file` in place of
`--prepare` and a `GITEA_TOKEN` from the dedicated publisher account. The tool `--prepare` and a `GITEA_TOKEN` from the dedicated publisher account. The tool
requires applicable branch and tag protection, resumes matching drafts, verifies checks the protected default branch and exact tag, resumes matching drafts,
the bytes on the forge and publishes only a complete inventory. A matching verifies the bytes on the forge and publishes only a complete inventory. A
public release is idempotent. A changed asset blocks the operation and needs a matching public release is idempotent. A changed asset blocks the operation and
new release decision. needs a new release decision.
## Not gated by CI (explicit non-claims) ## Not gated by CI (explicit non-claims)
-4
View File
@@ -4,7 +4,6 @@
from __future__ import annotations from __future__ import annotations
import argparse import argparse
import fnmatch
import hashlib import hashlib
import json import json
import os import os
@@ -136,9 +135,6 @@ def candidate(service, tag, pipeline, paths, *, publish):
require(actor["login"] == "marqdo-publisher" and actor.get("is_admin") is False, require(actor["login"] == "marqdo-publisher" and actor.get("is_admin") is False,
"publication requires the non-admin publisher account") "publication requires the non-admin publisher account")
require(branch_info["protected"] is True, "default branch must be protected") require(branch_info["protected"] is True, "default branch must be protected")
rules = service.json(f"/repos/{REPO}/tag_protections")
require(any(fnmatch.fnmatchcase(tag, rule["name_pattern"]) for rule in rules),
"tag requires an applicable protection rule")
ci = ready_ci(service, head, pipeline, repository) ci = ready_ci(service, head, pipeline, repository)
archive = paths[0] archive = paths[0]