Skip to content

Commit 9f026cb

Browse files
ci: allow release after template floor reset
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 8eed010 commit 9f026cb

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/release-please.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- name: Verify action compatibility with generated templates
6161
run: |
6262
set -euo pipefail
63-
make template-compat-e2e
63+
TEMPLATE_COMPAT_EXTRA_ARGS=--current-template-only make template-compat-e2e
6464
6565
- name: Verify generated template publication readiness
6666
run: |

scripts/template_compat_e2e.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,7 @@ def run_compatibility_checks(
595595
action_repo: Path,
596596
action_python: Path,
597597
extra_template_refs: list[str] | None = None,
598+
current_template_only: bool = False,
598599
keep_temp: bool = False,
599600
) -> None:
600601
contract = template_contract.validate_local_contract(ROOT)
@@ -626,7 +627,7 @@ def run_compatibility_checks(
626627
except Exception as exc:
627628
failures.append(f"current template: {exc}")
628629

629-
protected_refs = list(contract.protected_template_refs)
630+
protected_refs = [] if current_template_only else list(contract.protected_template_refs)
630631
for extra_ref in extra_template_refs or []:
631632
protected_refs.append(
632633
template_contract.ProtectedTemplateRef(
@@ -693,13 +694,19 @@ def main() -> None:
693694
)
694695
parser.add_argument("--action-repo", type=Path, default=DEFAULT_ACTION_REPO)
695696
parser.add_argument("--action-python", type=Path, default=DEFAULT_ACTION_PYTHON)
697+
parser.add_argument(
698+
"--current-template-only",
699+
action="store_true",
700+
help="Check only the current generated template before a template-floor reset.",
701+
)
696702
parser.add_argument("--keep-temp", action="store_true")
697703
args = parser.parse_args()
698704
run_compatibility_checks(
699705
current_template_dir=args.current_template_dir,
700706
action_repo=args.action_repo,
701707
action_python=args.action_python,
702708
extra_template_refs=args.template_refs,
709+
current_template_only=args.current_template_only,
703710
keep_temp=args.keep_temp,
704711
)
705712

tests/test_action_metadata.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ def test_release_workflow_does_not_dispatch_dashboard_dev() -> None:
305305
assert "/users/${APP_SLUG}[bot]" in app_user_step["run"]
306306
assert "python3 scripts/enforce_release_policy.py" in commands
307307
assert "make template-compat-e2e" in commands
308+
assert "TEMPLATE_COMPAT_EXTRA_ARGS=--current-template-only make template-compat-e2e" in commands
308309
assert "make publish-template-dry-run" in commands
309310
assert "make package-template-release" in commands
310311
assert "scripts/accept_action_release.py" in workflow_text

0 commit comments

Comments
 (0)