Skip to content

Conversation

@Achanandhi-M
Copy link

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

Signed-off-by: Achanandhi-M <achanandhi.m@gmail.com>
Copy link
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 😅

Signed-off-by: Achanandhi-M <achanandhi.m@gmail.com>
@Achanandhi-M
Copy link
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.

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

2 participants