feat(action): atomic-branch/create-branch - Create/update artifact branch

Open
#28 2 comments 0 reactions 1 assignee View on GitHub

@aRustyDev is already working on this.

Since Jan 27, 2026.

Assessment

This issue has not been assessed yet.

Description

enhancement new-action

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 <artifact-path> 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

- 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
Dominant language
Shell
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aRustyDev/gh

All issues in aRustyDev/gh

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.