ci: Gitea 단계 workflow 셋(pr·main·release)을 더한다
main / main-check (push) Failing after 5s

템플릿 안에서 이 코드는 workflow 셋에 흩어진 job 넷과 단계 하나
(optional-platforms, grpc-proto-buf, grpc-optional-platform-integration,
grpc-stable-release-gate, integration-main의 optional 성능 단계)로 돌았다.
job마다 셸 로직이 있어 무엇이 어느 단계에 도는지 workflow를 읽어야 했다.

처음부터 단계 파일 셋으로 둔다(설계 7.1절, 소유자 결정 「workflow는 단계
파일 셋, lane 선택은 Gradle 단계 태스크」). job은 Gradle 한 줄이다.
- pr.yml(pull_request): ./gradlew ci, 그리고 verifyStrictLaneStages
  --dry-run. 후자는 단계를 계획만 해야 해서 ci의 의존이 될 수 없다.
- main.yml(main push, 매일 03:00 KST, 수동): ./gradlew mainCheck.
  Testcontainers는 runner의 docker-in-docker를 쓴다.
- release.yml(v* 태그): ./gradlew releaseCheck release. 태그는
  RELEASE_TAG로 넘기고 형식 검사는 Gradle이 한다. 비밀 값 셋은 소유자가
  repo secret에 넣는다(docs/work/release.md 1절).
action은 github.com 전체 URL과 커밋 SHA로 고정했다. Gitea는 호스트 없는
action을 기본 주소에서 받는데, 그 기본값에 기대지 않는다.

위험: Gitea runner에서 setup-gradle의 캐시가 도는지는 첫 실행에서 본다.
release.yml은 태그를 달지 않아 실행해 보지 못했다(리허설로 대신했다).

검증(desktop): verifyStrictLaneStages --dry-run rc=0(세 단계 모두 실행으로
센다). Gitea 실행 결과는 push 뒤.
This commit is contained in:
DongHyeonka
2026-11-08 11:20:29 +09:00
parent 239547bc2c
commit 90306b282c
4 changed files with 131 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
## 무엇을, 왜
<!-- 지금 무엇이 문제인가. 이 PR이 무엇을 바꾸는가. -->
## 고른 방법과 버린 대안
<!-- 왜 이 방법인가. 검토하고 버린 방법과 그 이유. -->
## 위험과 영향
<!-- 호환성(공개 타입·proto·설정 키면 MAJOR인지), 운영, 보안. 검증하지 못한 것과 일부러 미룬 것. 없으면 "없음"이라고 쓰지 말고 왜 없는지 한 줄. -->
## 검증
<!-- 실행한 명령과 결과(scripts/verify.sh pr 등). 실행하지 않은 검증은 안 했다고 쓴다. 공개 API를 바꿨으면 템플릿 쪽 영향(docs/work/README.md 3절). -->
## 리뷰어가 볼 곳
<!-- 특히 봐야 할 파일. 기계적으로 만든 부분은 만든 방법(명령, 기준 커밋). -->
## 관련
<!-- 이슈, 설계 문서, 결정 기록. -->
+34
View File
@@ -0,0 +1,34 @@
# Main-branch stage, on every push to main and nightly. The job is the Gradle stage `mainCheck`:
# `ci` again on the merged commit, plus the lanes that start containers (integrationCheck) or measure
# (performanceCheck). Docker comes from the runner (desktop-runner, docker-in-docker).
name: main
on:
push:
branches: [main]
schedule:
# 03:00 KST.
- cron: "0 18 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
main-check:
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: https://github.com/actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: temurin
java-version: "21.0.11+10"
- uses: https://github.com/gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6
with:
build-scan-publish: false
- run: ./gradlew mainCheck --stacktrace
env:
TESTCONTAINERS_REUSE_ENABLE: "false"
+32
View File
@@ -0,0 +1,32 @@
# Pull-request stage. The job is the Gradle stage `ci`; which modules, lanes and gates that means is
# decided in build.gradle, not here (docs/work/gates.md).
name: pr
on:
pull_request:
permissions:
contents: read
jobs:
ci:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# bufBreaking compares the schema with the merge base of the target branch.
fetch-depth: 0
- uses: https://github.com/actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: temurin
java-version: "21.0.11+10"
# Validates the checked-in wrapper jar and caches Gradle's downloads.
- uses: https://github.com/gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6
with:
build-scan-publish: false
cache-read-only: true
- run: ./gradlew ci --stacktrace
# Every strict lane is in a stage some workflow here executes. It plans the stages with
# --dry-run, so it cannot be a dependency of `ci` and is the one second line.
- run: ./gradlew verifyStrictLaneStages --dry-run --stacktrace
+42
View File
@@ -0,0 +1,42 @@
# Release stage, on a vMAJOR.MINOR.PATCH tag (docs/work/release.md). One Gradle invocation:
# `releaseCheck` (certification and integration lanes, version, SBOM, dependency gate) and then
# `release` (publish every module and the SBOM to Gitea Packages, signed, and read the version back
# anonymously). Publishing starts only after releaseCheck has passed, so a red check leaves nothing
# half-published (Gitea refuses a second upload of a version).
#
# Secrets (repository settings, created by the owner): PACKAGES_TOKEN, a personal access token with
# package read/write only (the job token cannot publish packages); SIGNING_KEY, an ASCII-armoured PGP
# secret key; SIGNING_PASSWORD, its passphrase.
name: release
on:
push:
tags: ["v*"]
permissions:
contents: read
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: https://github.com/actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: temurin
java-version: "21.0.11+10"
- uses: https://github.com/gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6
with:
build-scan-publish: false
cache-read-only: true
# The tag names the version: ca.java-conventions refuses any RELEASE_TAG that is not
# vMAJOR.MINOR.PATCH. releaseCheck is named although release depends on it, because
# verifyStrictLaneStages counts a stage only when a command names it.
- run: ./gradlew releaseCheck release --stacktrace
env:
RELEASE_TAG: ${{ github.ref_name }}
PACKAGES_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
TESTCONTAINERS_REUSE_ENABLE: "false"