Skip to content

Conversation

@onedr0p
Copy link
Contributor

@onedr0p onedr0p commented Sep 5, 2025

🚀 Hey, I have created a Pull Request

Description of changes

Hi 👋

I came across your composite action and found it useful so I decided to re-write it using github action script instead. Free free to discard this PR if you are happy with bash but I thought I should share.

You can see a preview here home-operations/containers#770

Thanks!

✔️ Checklist

  • I have followed the contribution guidelines for this repository
  • I have added tests for new behavior, and have not broken any existing tests
  • I have added or updated relevant documentation
  • I have verified that all added components are accounted for in the SBOM

Hi 👋 

I came across your composite action and found it useful so I decided to re-write it using github action script instead. Free free to discard this PR if you are happy with bash but I thought I should share.

Thanks!

Signed-off-by: Devin Buhl <onedr0p@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 5, 2025 15:02
@onedr0p onedr0p requested a review from a team as a code owner September 5, 2025 15:02

This comment was marked as outdated.

Signed-off-by: Devin Buhl <onedr0p@users.noreply.github.com>
Signed-off-by: Devin Buhl <onedr0p@users.noreply.github.com>
@onedr0p onedr0p changed the title ci: refactor container size diff action to Node.js ci: refactor container size diff action to use github-script Sep 5, 2025
@rjaegers
Copy link
Member

rjaegers commented Sep 8, 2025

Hi @onedr0p!

Thanks for your contribution. Great to see you have found the size comparison action useful. Can you take a look at the feedback from CoPilot and the Zizmor findings? I don’t see any objections to merging this when those are fixed.

Signed-off-by: Devin Buhl <onedr0p@users.noreply.github.com>
@onedr0p
Copy link
Contributor Author

onedr0p commented Sep 8, 2025

I believe that should do it!

@rjaegers rjaegers requested a review from Copilot September 9, 2025 11:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the container size diff GitHub action from a bash script implementation to use the github-script action with Node.js. The change maintains the same functionality while improving code structure and readability.

Key changes:

  • Replaces bash script execution with github-script action
  • Implements container size comparison logic directly in JavaScript
  • Adds proper error handling and platform filtering

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@rjaegers
Copy link
Member

rjaegers commented Sep 9, 2025

I noticed you are still making changes to the action in your context (home-operations/containers#783). Shall I wait with merging this? As I like the direction of your PR.

@onedr0p
Copy link
Contributor Author

onedr0p commented Sep 9, 2025

@rjaegers Yeah sure, I'll update it here when I am done testing. Just adding in some npm modules to try and improve readability at the cost of some external modules. I will mark this as a draft for now and switch it back to review when done.

@onedr0p onedr0p marked this pull request as draft September 9, 2025 11:40
Signed-off-by: Devin Buhl <onedr0p@users.noreply.github.com>
@onedr0p
Copy link
Contributor Author

onedr0p commented Sep 9, 2025

I updated this and added caching of npm packages. The message now looks like this:

image

@onedr0p onedr0p marked this pull request as ready for review September 9, 2025 14:39
@sonarqubecloud
Copy link

@onedr0p
Copy link
Contributor Author

onedr0p commented Sep 16, 2025

Looks like you are running into the same issue as me over in my repo 😅

https://www.github.com/home-operations/containers/issues/792

@rjaegers
Copy link
Member

Looks like you are running into the same issue as me over in my repo 😅

https://www.github.com/home-operations/containers/issues/792

Indeed, and its a funny thing as this should hamper a lot of public repositories with a large(r) set of ci/cd checks. This is not the first time I run into this problem and thus far have found no nice solution.

I even asked CoPilot for advice, and it insisted an option exists to re-run the workflow with elevated permissions if it comes from a fork. Although that is nowhere to be found in the GitHub documentation 😕.

@onedr0p
Copy link
Contributor Author

onedr0p commented Sep 16, 2025

My workaround is to pull the PR from an external contributor and build/test it locally. Another option is to duplicate the PR so checks happen and then close it when successful, then merge the external contributors PR.

@rjaegers rjaegers merged commit 97ccbd8 into philips-software:main Sep 17, 2025
19 of 24 checks passed
@onedr0p onedr0p deleted the patch-1 branch September 17, 2025 18:43
@github-actions
Copy link
Contributor

🎉 Hooray! The changes in this pull request went live with the release of v6.4.0 🎉

@github-actions
Copy link
Contributor

🎉 Hooray! The changes in this pull request went live with the release of v6.4.1 🎉

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.

2 participants