-
Notifications
You must be signed in to change notification settings - Fork 15
chore: Added app builds for Windows, macOS, Linux #217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Reviewer's GuideThis PR extends both push and pull_request GitHub workflows to support cross-platform Flutter builds for Windows, macOS, Debian, and Web by introducing new CI jobs, composite actions for each platform, artifact uploads, and automated publishing to the 'app' branch. Flow diagram for new build and publish process for each platformflowchart TD
checkout["Checkout Source Code"] --> setup_flutter["Set up Flutter"]
setup_flutter --> build_app["Build App (platform-specific)"]
build_app --> upload_artifact["Upload Build Artifact"]
upload_artifact --> push_app_branch["Push Build to 'app' branch"]
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
Blocking issues:
- An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. (link)
- An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. (link)
- An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. (link)
- An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. (link)
General comments:
- Extract the repeated “Push Build to app branch” shell logic into a reusable composite action or step to reduce duplication across all platforms.
- The Web build job’s push step is missing the final
git push --force origin app
—add it to keep consistency with the other platform workflows. - Consider using a matrix strategy for your per-platform jobs instead of copying identical steps to DRY up the workflow file.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Extract the repeated “Push Build to app branch” shell logic into a reusable composite action or step to reduce duplication across all platforms.
- The Web build job’s push step is missing the final `git push --force origin app`—add it to keep consistency with the other platform workflows.
- Consider using a matrix strategy for your per-platform jobs instead of copying identical steps to DRY up the workflow file.
## Security Issues
### Issue 1
<location> `.github/actions/debian/action.yml:17` </location>
<issue_to_address>
**security (yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha):** An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.
*Source: opengrep*
</issue_to_address>
### Issue 2
<location> `.github/actions/macos/action.yml:17` </location>
<issue_to_address>
**security (yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha):** An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.
*Source: opengrep*
</issue_to_address>
### Issue 3
<location> `.github/actions/web/action.yml:17` </location>
<issue_to_address>
**security (yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha):** An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.
*Source: opengrep*
</issue_to_address>
### Issue 4
<location> `.github/actions/windows/action.yml:17` </location>
<issue_to_address>
**security (yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha):** An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.
*Source: opengrep*
</issue_to_address>
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Build StatusBuild successful. APKs to test: https://github.com/fossasia/magic-epaper-app/actions/runs/17798026080/artifacts/4034570206. Screenshots |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't just plainly push the files to the app branch. We should instead package them into installers and then push them.
See for example, in Windows: fossasia/pslab-app#2896.
You can figure out similarly for Linux packages (.deb, .rpm). For macOS, pushing the .app
should be enough.
Oh okay will do it, thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New security issues found
@Dhruv1797 please test this, thank you |
Fixes: #181
Summary by Sourcery
Add CI pipelines to build and deploy Flutter app for Debian, macOS, Windows, and Web platforms
New Features:
Enhancements:
CI:
app
branch