Draft: feat: Added Github CI to trigger pubgrade#405
Draft: feat: Added Github CI to trigger pubgrade#405akash2237778 wants to merge 2 commits intomainfrom
Conversation
Signed-off-by: Akäsh Säiñi <46739435+akash2237778@users.noreply.github.com>
|
Reviewer's GuideThis PR adds a new GitHub Actions workflow (.github/workflows/pubgrade.yml) that triggers a pubgrade build via an API call whenever code is pushed to the main or add-ci branches. Sequence diagram for GitHub Actions workflow triggering pubgrade buildsequenceDiagram
participant Dev as Developer
participant GitHub as GitHub
participant Actions as GitHub Actions
participant Pubgrade as pubgrade API
participant DockerHub as DockerHub
Dev->>GitHub: Push to main/add-ci branch
GitHub->>Actions: Trigger workflow
Actions->>Actions: Checkout repository
Actions->>Actions: Get repo, branch, version
Actions->>Pubgrade: Send build trigger (cURL, tokens)
Pubgrade->>DockerHub: Build and push Docker image
Pubgrade-->>Actions: Build status
Flow diagram for new pubgrade build trigger processflowchart TD
A[Push to main/add-ci branch]
B[GitHub Actions workflow starts]
C[Checkout repository]
D[Get repo/branch/version]
E[Trigger pubgrade build via API]
F[pubgrade builds Docker image]
G[Image pushed to DockerHub]
A --> B --> C --> D --> E --> F --> G
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- The "Get repository name" step sets REPO_NAME but it’s never used in the workflow—consider removing it.
- Add
set -eat the top or usecurl -fin the trigger step to ensure the job fails on non-2xx HTTP responses. - Guard against
git describefailing when there are no tags or returning dirty suffixes by providing a fallback version or cleaning its output.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The "Get repository name" step sets REPO_NAME but it’s never used in the workflow—consider removing it.
- Add `set -e` at the top or use `curl -f` in the trigger step to ensure the job fails on non-2xx HTTP responses.
- Guard against `git describe` failing when there are no tags or returning dirty suffixes by providing a fallback version or cleaning its output.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Is it safe to merge @akash2237778 ? |
Description
Fixes #(issue)
Checklist
Comments
Summary by Sourcery
New Features: