mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Signed-off-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co> Co-authored-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co>
31 lines
1.1 KiB
Bash
Executable File
31 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
python3 - <<'PY'
|
|
from pathlib import Path
|
|
import yaml
|
|
|
|
auto_path = Path('.github/workflows/auto-tag-on-release-pr-merge.yml')
|
|
publish_path = Path('.github/workflows/push-gateway-helm-chart.yml')
|
|
auto_text = auto_path.read_text()
|
|
publish_text = publish_path.read_text()
|
|
# Parse first, then pin the cross-workflow strings whose agreement makes this a
|
|
# reachable lane rather than an orphan publisher.
|
|
yaml.safe_load(auto_text)
|
|
yaml.safe_load(publish_text)
|
|
for needle in (
|
|
'push-chart-release/*)',
|
|
'VERSION="${BRANCH#push-chart-release/}"',
|
|
'TAG_PREFIX="push-chart-v"',
|
|
'DISPATCH="push-gateway-helm-chart"',
|
|
'push-gateway-helm-chart) WORKFLOW="push-gateway-helm-chart.yml"',
|
|
):
|
|
assert needle in auto_text, f'missing auto-tag gateway chart contract: {needle}'
|
|
for needle in (
|
|
'tags: ["push-chart-v[0-9]*"]',
|
|
'version="${INPUT_VERSION:-${REF_NAME#push-chart-v}}"',
|
|
'refs/tags/push-chart-v${version}^{commit}',
|
|
'deploy/charts/buzz-push-gateway',
|
|
):
|
|
assert needle in publish_text, f'missing gateway chart publisher contract: {needle}'
|
|
PY
|