feat(action): atomic-branch/create-branch - Create/update artifact branch
- Lingua principale
- Shell
- Stelle
- 0
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
## Parent Epic
Part of #22 (Atomic Release Pipeline Actions)
## Priority
P1 - Core W2 functionality
## Description
Create a composite action that creates or updates an artifact-specific branch.
For each changed artifact, creates a dedicated branch (e.g., `charts/my-chart`) containing only changes for that artifact.
## Inputs
| Input | Required | Default | Description |
|-------|----------|---------|-------------|
| `artifact` | Yes | - | Artifact name |
| `artifact-path` | Yes | - | Path to artifacts directory |
| `branch-prefix` | No | `` | Prefix for branch name |
| `target-branch` | No | `main` | Base branch for new branches |
| `source-sha` | No | `github.sha` | Commit SHA to copy artifact from |
## Outputs
| Output | Description |
|--------|-------------|
| `branch` | Full branch name (e.g., "charts/my-chart") |
| `updated` | "true" if branch was updated, "false" if no changes |
| `sha` | New branch HEAD SHA |
## Usage Example
```yaml
- uses: arustydev/gha/actions/atomic-branch/create-branch@v1
id: branch
with:
artifact: my-chart
artifact-path: charts
branch-prefix: charts
target-branch: main
- run: echo "Branch: ${{ steps.branch.outputs.branch }}"
```
## Source Reference
`gha/.github/workflows/atomic-release-atomize-changes.yml`:
- Create/update artifact branch step (lines 227-313)
## Implementation Notes
- Check if branch exists, fetch if so
- Skip if artifact content is already identical
- Use force-with-lease for safe pushes
- Implement retry logic for push failures
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.