diff --git a/.gitea/pull_request_template.md b/.gitea/pull_request_template.md new file mode 100644 index 0000000..a546c3f --- /dev/null +++ b/.gitea/pull_request_template.md @@ -0,0 +1,23 @@ +## 무엇을, 왜 + + + +## 고른 방법과 버린 대안 + + + +## 위험과 영향 + + + +## 검증 + + + +## 리뷰어가 볼 곳 + + + +## 관련 + + diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml new file mode 100644 index 0000000..c475bf5 --- /dev/null +++ b/.gitea/workflows/main.yml @@ -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" diff --git a/.gitea/workflows/pr.yml b/.gitea/workflows/pr.yml new file mode 100644 index 0000000..c65f81f --- /dev/null +++ b/.gitea/workflows/pr.yml @@ -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 diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..028349f --- /dev/null +++ b/.gitea/workflows/release.yml @@ -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"