chore: change pr merge workflow
This commit is contained in:
parent
1019914d50
commit
17974d7a12
4 changed files with 193 additions and 88 deletions
48
.forgejo/README.md
Normal file
48
.forgejo/README.md
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# Forgejo Configuration
|
||||
|
||||
This directory contains configuration files for Forgejo (self-hosted Git service).
|
||||
|
||||
## Pull Request Template
|
||||
|
||||
The `pull_request_template.md` is automatically loaded when creating a new Pull Request. It provides a checklist and instructions for the PR workflow, including how to run the full test suite before merging.
|
||||
|
||||
## Branch Protection Setup
|
||||
|
||||
To enforce the full test suite before merging to `main`, configure branch protection in Forgejo:
|
||||
|
||||
### Steps:
|
||||
|
||||
1. Go to **Repository Settings** → **Branches** → **Protected Branches**
|
||||
2. Add a new rule for branch: `main`
|
||||
3. Configure the following settings:
|
||||
- ☑️ **Enable Branch Protection**
|
||||
- ☑️ **Require status checks to pass before merging**
|
||||
- Add required check: `check-full`
|
||||
- ☐ **Require approvals** (optional, based on team preference)
|
||||
- ☑️ **Block if there are outstanding requests** (optional)
|
||||
|
||||
### What this does:
|
||||
|
||||
- The **"Merge"** button in PRs will only be enabled after `check-full` passes
|
||||
- `check-full` is triggered by **promoting** a build in Drone CI (see PR template)
|
||||
- This ensures all tests (including slow and UI tests) run before merging
|
||||
|
||||
## Workflow
|
||||
|
||||
1. **Create PR** → Fast test suite (`check-fast`) runs automatically
|
||||
2. **Development** → Fast tests run on every push for quick feedback
|
||||
3. **Ready to merge:**
|
||||
- Remove `WIP:` from PR title
|
||||
- Go to Drone CI and **promote** the build to `production`
|
||||
- This triggers `check-full` (full test suite)
|
||||
4. **After full tests pass** → Merge button becomes available
|
||||
5. **Merge to main** → Container is built and published
|
||||
|
||||
## Secrets Required
|
||||
|
||||
Make sure the following secrets are configured in Drone CI:
|
||||
|
||||
- `DRONE_REGISTRY_USERNAME` - For container registry
|
||||
- `DRONE_REGISTRY_TOKEN` - For container registry
|
||||
- `RENOVATE_TOKEN` - For Renovate bot
|
||||
- `GITHUB_COM_TOKEN` - For Renovate bot (GitHub dependencies)
|
||||
Loading…
Add table
Add a link
Reference in a new issue