[IMP] manual deployment workflow with dry-run and filters
Replace automatic deployment (on push) with manual workflow_dispatch: - Version filter: deploy to all versions or specific one (16.0, 18.0) - Repo filter: deploy to all repos or comma-separated list - Dry-run mode: preview changes without creating PRs - Detailed summary with emoji indicators and statistics Benefits: - Full control over deployment scope and timing - Safe preview before creating 50+ PRs - Targeted deployments for testing Update README with new deployment guide and examples.
This commit is contained in:
67
README.md
67
README.md
@@ -17,7 +17,7 @@ This repository manages linting and CI configuration centrally for all Odoo repo
|
||||
```
|
||||
odoo-elabore-ci/
|
||||
├── .gitea/workflows/
|
||||
│ └── deploy-config.yml # Automatic deployment workflow
|
||||
│ └── deploy-config.yml # Manual deployment workflow (with dry-run)
|
||||
└── config/
|
||||
├── common/ # Shared files (all versions)
|
||||
│ ├── .editorconfig
|
||||
@@ -43,14 +43,21 @@ odoo-elabore-ci/
|
||||
|
||||
### Deployment Workflow (`deploy-config.yml`)
|
||||
|
||||
When a push is made to the `main` branch of this repository:
|
||||
The deployment is **manually triggered** via Gitea Actions interface, giving you full control over what gets deployed and where.
|
||||
|
||||
1. The workflow automatically detects available versions (folders in `config/` other than `common/`)
|
||||
2. For each `*-addons` or `*-tools` repository in the organization:
|
||||
- For each configured Odoo version (16.0, 18.0, etc.):
|
||||
- Attempts to clone the corresponding branch from the target repo
|
||||
- If it exists: copies `config/common/` then `config/{version}/`
|
||||
- Creates a Pull Request if changes are detected
|
||||
**Features:**
|
||||
- **Version filter**: Deploy to all versions or a specific one (16.0, 18.0)
|
||||
- **Repo filter**: Deploy to all repos or specific ones (comma-separated)
|
||||
- **Dry-run mode**: Preview changes without creating any PRs
|
||||
|
||||
**Process:**
|
||||
1. Detects available versions (folders in `config/` other than `common/`)
|
||||
2. For each target repository:
|
||||
- For each selected Odoo version:
|
||||
- Attempts to clone the corresponding branch
|
||||
- Copies `config/common/` then `config/{version}/`
|
||||
- In dry-run: shows what would change
|
||||
- In live mode: creates a Pull Request if changes detected
|
||||
|
||||
### CI Workflow (`pre-commit.yml`)
|
||||
|
||||
@@ -73,6 +80,44 @@ Deployed to each target repository, this workflow runs on every Pull Request:
|
||||
|
||||
## Usage Guide
|
||||
|
||||
### Deploying Configuration
|
||||
|
||||
Deployment is done via the Gitea Actions interface:
|
||||
|
||||
1. Go to **Gitea** → `odoo-elabore-ci` → **Actions**
|
||||
2. Select **"Deploy CI Config"** workflow
|
||||
3. Click **"Run workflow"**
|
||||
4. Fill in the parameters:
|
||||
|
||||
| Parameter | Description | Examples |
|
||||
|-----------|-------------|----------|
|
||||
| **Version** | Odoo version to deploy | `all`, `16.0`, `18.0` |
|
||||
| **Repos** | Target repos (empty = all) | `crm-addons, hr-addons` |
|
||||
| **Dry-run** | Preview without creating PRs | `true` (recommended first) |
|
||||
|
||||
#### Deployment Examples
|
||||
|
||||
| I want to... | Version | Repos | Dry-run |
|
||||
|--------------|---------|-------|---------|
|
||||
| Preview all changes | `all` | *(empty)* | ✅ |
|
||||
| Deploy 16.0 to one repo | `16.0` | `crm-addons` | ❌ |
|
||||
| Deploy 18.0 to multiple repos | `18.0` | `crm-addons, hr-addons` | ❌ |
|
||||
| Deploy all versions everywhere | `all` | *(empty)* | ❌ |
|
||||
|
||||
#### Recommended Workflow
|
||||
|
||||
```
|
||||
1. Make changes in config/
|
||||
2. git commit && git push origin main
|
||||
→ Nothing happens (no auto-deploy)
|
||||
|
||||
3. Run workflow with DRY-RUN enabled
|
||||
→ Review the logs to see what would change
|
||||
|
||||
4. If satisfied, run again WITHOUT dry-run
|
||||
→ PRs are created in target repos
|
||||
```
|
||||
|
||||
### Modifying CI Configuration
|
||||
|
||||
1. **Edit files in `config/`**:
|
||||
@@ -86,7 +131,7 @@ Deployed to each target repository, this workflow runs on every Pull Request:
|
||||
git push origin main
|
||||
```
|
||||
|
||||
3. **The workflow automatically creates PRs** in all affected repos
|
||||
3. **Trigger deployment manually** (see above)
|
||||
|
||||
### Adding a New Odoo Version
|
||||
|
||||
@@ -117,7 +162,9 @@ Deployed to each target repository, this workflow runs on every Pull Request:
|
||||
git push origin main
|
||||
```
|
||||
|
||||
The workflow will automatically detect the new folder and deploy the configuration to repos with a `19.0` branch.
|
||||
5. **Deploy** via Gitea Actions:
|
||||
- The new version will appear in the "Version" dropdown
|
||||
- Use dry-run first to verify which repos have a `19.0` branch
|
||||
|
||||
## Secrets Configuration
|
||||
|
||||
|
||||
Reference in New Issue
Block a user