chore(ci): allow Docker build from specified branch with default staging#842
Conversation
WalkthroughThe Docker image GitHub Actions workflow now accepts a branch input (default "staging"), checks out that ref, derives the Docker tag solely from the workflow input, fails if the tag is missing or already exists, and builds/pushes the image without emitting image digest logging. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant GH as GitHub Actions
participant Reg as Registry
Dev->>GH: Trigger workflow (branch=input, tag=input)
GH->>GH: Checkout repository at ref = branch
GH->>GH: Resolve VERSION from workflow input
alt VERSION missing
GH-->>Dev: Fail: tag input required
else VERSION present
GH->>Reg: Check if tag VERSION exists
alt Tag exists
GH-->>Dev: Fail: tag already exists
else Tag absent
GH->>GH: Build Docker image :VERSION
GH->>Reg: Push image :VERSION
GH-->>Dev: Success
end
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit