- drop the separate validate job (the zip is validated after packaging); same in release - shared scripts/ci/assert-built-assets.sh (BusyBox-safe), now also used by release - actions/cache for npm, shopware-cli and composer - phpunit: shopware-cli image instead of a 4.5 min apt install; MariaDB 10.11 (11.4 broke Shopware's migrations: Duplicate column 'sorter_key') - protect-main.sh: drop the removed validate context Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
17 lines
677 B
Bash
17 lines
677 B
Bash
#!/usr/bin/env bash
|
|
# One-time (re-runnable) setup: require the PR checks on `main` using the Gitea `tea` CLI.
|
|
# `tea branches protect` cannot set status-check contexts, hence `tea api`.
|
|
# Usage: scripts/protect-main.sh [owner/repo] (default: derived from the git remote)
|
|
set -euo pipefail
|
|
|
|
REPO="${1:-$(git config --get remote.origin.url | sed -E 's#^.*[:/]([^/]+/[^/]+)$#\1#; s#\.git$##')}"
|
|
|
|
tea api -X PATCH "repos/${REPO}/branch_protections/main" -d '{
|
|
"enable_status_check": true,
|
|
"status_check_contexts": [
|
|
"version-changelog / version-changelog (pull_request)",
|
|
"plugin-checks / package (pull_request)",
|
|
"plugin-checks / phpunit (pull_request)"
|
|
]
|
|
}'
|