Skip to content

ci: build sample apps on PRs and push on main#467

Merged
calebschoepp merged 1 commit intospinframework:mainfrom
Achanandhi-M:update-github-sample-app-ci
Jan 29, 2026
Merged

ci: build sample apps on PRs and push on main#467
calebschoepp merged 1 commit intospinframework:mainfrom
Achanandhi-M:update-github-sample-app-ci

Conversation

@Achanandhi-M
Copy link
Copy Markdown
Contributor

This PR refactors the sample apps GitHub Actions workflow to improve CI behavior by clearly separating pull request builds from main branch publishes.

Sample apps are now built on pull requests to validate changes early, while image publishing remains restricted to merges on the main branch.

Closes #439

Copy link
Copy Markdown
Contributor

@endocrimes endocrimes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Unfortunately this change doesn't let the apps build - we'd need to use spin build (not sure if we have a dedicated action) to build the apps - the push that was made conditional was a "build and push", not just push 😅

@Achanandhi-M
Copy link
Copy Markdown
Contributor Author

Thanks for the PR!

Unfortunately this change doesn't let the apps build - we'd need to use spin build (not sure if we have a dedicated action) to build the apps - the push that was made conditional was a "build and push", not just push 😅

Thanks for the clarification! @endocrimes

I’ve updated the workflow to explicitly run spin build for both pull requests and the main branch, and kept spin push conditional so images are only published on merges to main. Appreciate the guidance 🙂

I also took some time to explore the available actions and couldn’t find a dedicated spin build action. From what I understand, spin push performs both the build and the push by default, so the goal here is to explicitly build the app for PRs and rely on spin push only when merging into main. Please let me know if this understanding is correct.

I’ve updated the PR accordingly.

@Achanandhi-M
Copy link
Copy Markdown
Contributor Author

Hey @endocrimes any updates on this PR?

Comment thread .github/workflows/sample-apps.yaml Outdated
Comment thread .github/workflows/sample-apps.yaml
@Achanandhi-M
Copy link
Copy Markdown
Contributor Author

Hi @calebschoepp, thanks for the suggestion!

I’ve updated the workflow so spin build now runs only for pull_request events, and the spin push step handles the build when merging to main, avoiding redundant builds.

I’ve also fixed the step naming for clarity. Please let me know if this looks good now — appreciate the review!

@calebschoepp calebschoepp dismissed endocrimes’s stale review January 27, 2026 01:20

Concerns have been addressed.

Copy link
Copy Markdown
Contributor

@calebschoepp calebschoepp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you for the contribution

@calebschoepp
Copy link
Copy Markdown
Contributor

Oh whoops. Looks like we can't merge it yet b/c the commits are not signed with verified signatures.

Would you mind squashing the 3 commits down to a single commit and making sure it is signed. See here for some details on making signed commits.

@Achanandhi-M Achanandhi-M force-pushed the update-github-sample-app-ci branch 2 times, most recently from ae58627 to 1ee6740 Compare January 27, 2026 04:14
@Achanandhi-M
Copy link
Copy Markdown
Contributor Author

Hey @calebschoepp , Yes — I’ve squashed the three commits into a single signed commit and force-pushed the update. The commit now shows as verified. Please let me know if you’d like any further changes.

@calebschoepp
Copy link
Copy Markdown
Contributor

Hey @calebschoepp , Yes — I’ve squashed the three commits into a single signed commit and force-pushed the update. The commit now shows as verified. Please let me know if you’d like any further changes.

I'm not sure how it happened but it looks like there are still two commits in this PR and the first one is not signed.

@Achanandhi-M Achanandhi-M force-pushed the update-github-sample-app-ci branch from 1ee6740 to e430e17 Compare January 27, 2026 06:10
Signed-off-by: Achanandhi-M <achanandhi.m@gmail.com>
@Achanandhi-M Achanandhi-M force-pushed the update-github-sample-app-ci branch from e430e17 to 392e525 Compare January 27, 2026 06:11
@Achanandhi-M
Copy link
Copy Markdown
Contributor Author

Hey @calebschoepp

Thanks for the heads up — you were right.

I’ve now squashed the entire PR into a single commit, re-signed it, and force-pushed the update. The PR now shows one verified commit. Please let me know if it looks good to merge now.

@calebschoepp calebschoepp merged commit 1e075e3 into spinframework:main Jan 29, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: Build apps on PRs

3 participants