Skip to content

Commit 228335f

Browse files
committed
chore: verify bootstrap version format before merge
Relates-to: keymanapp/keyman.com#794 Test-bot: skip
1 parent 86fbccf commit 228335f

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,16 @@ jobs:
7979
source ./_common/tests.inc.sh
8080
set -e
8181
do_test_print_container_error_logs "$CONTAINER_DESC"
82+
83+
- name: Verify .bootstrap-required-version
84+
if: ${{ !cancelled() }}
85+
shell: bash
86+
run: |
87+
# We want to avoid merging a bootstrap version that is not based on a published tag
88+
# in the shared-sites repo. We will do this with a heuristic based on the normal
89+
# shape of the tags, which is `v#.#.#`. Any other shape we will assume is a test
90+
# branch.
91+
cat resources/.bootstrap-required-version | grep -qP '^v\d+\.\d+\.\d+$' || (
92+
echo "::error file=resources/.bootstrap-required-version,line=1,col=1::This branch cannot be merged, because resources/.bootstrap-required-version references \`$(cat resources/.bootstrap-required-version)\`, which does not appear to be a published tag -- is it a test branch?"
93+
exit 1
94+
)

0 commit comments

Comments
 (0)