Skip to content

Commit 9ddf1eb

Browse files
Block manual GitLab CI on main
Signed-off-by: yoshifuminakamura <nakamura@riken.jp>
1 parent 06ceb21 commit 9ddf1eb

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

‎.github/workflows/gitlab-manual-ci.yml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,19 @@ jobs:
5353
fetch-depth: 0
5454
path: trusted
5555

56+
- name: Reject production main target
57+
env:
58+
TARGET_REF: ${{ inputs.target_ref }}
59+
run: |
60+
set -euo pipefail
61+
62+
case "${TARGET_REF}" in
63+
main|heads/main|refs/heads/main|origin/main|refs/remotes/origin/main)
64+
echo "::error::GitLab Manual CI must not target the production main branch. Use develop, a trusted ci/pr-* branch, a feature branch, a tag, or a SHA for manual validation."
65+
exit 1
66+
;;
67+
esac
68+
5669
- name: Prepare GitLab repository settings
5770
id: gitlab-repo
5871
uses: ./trusted/.github/actions/prepare-gitlab-repo

‎docs/ci.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ The workflow accepts these inputs:
7878
| `park_only` | Run only the legacy Benchpark bridge path / legacy Benchpark bridgeのみ実行 | `true` |
7979
| `park_send` | Run the legacy Benchpark bridge send-only path / legacy Benchpark bridge送信系のみ実行 | `true` |
8080

81+
`GitLab Manual CI` is for development and release-candidate validation, not for producing production `main` branch results. The workflow rejects `target_ref` values that name the production `main` branch. Public `main` measurements should be produced by Portal-managed triggers with an explicit `code` / `system` scope and an explicit `RESULT_SERVER` pipeline variable.
82+
83+
`GitLab Manual CI` は開発・release candidate検証用であり、本番 `main` branch結果を作る入口ではありません。このworkflowは本番 `main` branchを指す `target_ref` を拒否します。公開用の `main` 計測は、Portal管理のtriggerから、明示的な `code` / `system` scope と明示的な `RESULT_SERVER` pipeline variable を渡して作成します。
84+
8185
このworkflowは以下を行います。
8286

8387
The workflow:

0 commit comments

Comments
 (0)