Skip to content
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

CI Builds - again #77

Open
stylesuxx opened this issue Mar 17, 2023 · 2 comments
Open

CI Builds - again #77

stylesuxx opened this issue Mar 17, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@stylesuxx
Copy link
Contributor

Since we are now running on the pull_request_target event, wrong builds are attached to PRs since it will always build the head against which it is running - not against the actual changes.

So, the workflow needs to be more complex, checking out the actual PR it is being triggered from and building that...

@stylesuxx stylesuxx self-assigned this Mar 17, 2023
@stylesuxx
Copy link
Contributor Author

To solve this in a way where anyone's PRs can be built there are two options:

Option 1

We need to make sure that the following conditions are met:

  • Build action has access to repo secrets (fulfilled by: pull_request_target)
  • Build action has access to the code from the PR, but won't use build tools from the PR - only the source, otherwise secrets might be easily leaked (TODO)

To achieve this, we would need to move the whole source files into their own directory, leaving the build tools outside. This would allow us To build from the target branch, pull in the changed source, swap it out and build.

This would limit us in the following way:

  • Changes to the build system will not be verified as part of the PR, thus resulting names for the hex files might be messed up.

Option 2

We would need to get rid of the password protected build env - I personally would not prefer to do that.

@stylesuxx
Copy link
Contributor Author

With the refactored code structure we can now easily swap src directory with the one from the potential PR and build without having to think about anything else.

@stylesuxx stylesuxx added the enhancement New feature or request label Jun 30, 2023
@stylesuxx stylesuxx modified the milestones: v0.21.0, v0.20.1 Jul 16, 2023
@stylesuxx stylesuxx modified the milestones: v0.20.1, v0.21.0 Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant