Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

feat: introduce new workflow to restrict image sizes for docs#62268

Merged
jhchabran merged 9 commits into
mainfrom
bahrmichael/restrict-image-sizes
May 13, 2024
Merged

feat: introduce new workflow to restrict image sizes for docs#62268
jhchabran merged 9 commits into
mainfrom
bahrmichael/restrict-image-sizes

Conversation

@bahrmichael

@bahrmichael bahrmichael commented Apr 30, 2024

Copy link
Copy Markdown
Contributor

After needing multiple attempts to get the images right in https://github.com/sourcegraph/sourcegraph/pull/62183, I'm adding this workflow to help others get automated feedback if their images are too large and should rather be in google cloud.

Test plan

Testing the workflow in this PR, see follow-up commits.

Expected failure: https://github.com/sourcegraph/sourcegraph/pull/62268/commits/22effa5aa70a13b3a7c25696086305bd3c33a69c

Expected success: https://github.com/sourcegraph/sourcegraph/pull/62268/commits/06087ea0d3953d65b7a7809497a54aa306910409

@cla-bot cla-bot Bot added the cla-signed label Apr 30, 2024

Check warning

Code scanning / Semgrep OSS

Semgrep Finding: security-semgrep-rules.semgrep-rules.yaml.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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Resolved.

@bahrmichael bahrmichael marked this pull request as ready for review April 30, 2024 08:55
@bahrmichael bahrmichael requested a review from jhchabran April 30, 2024 08:56
@jhchabran jhchabran force-pushed the bahrmichael/restrict-image-sizes branch 2 times, most recently from 41ffd7b to d8d000e Compare May 13, 2024 09:03

@jhchabran jhchabran left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I was worrying at first that removing an image that's too large in the next commit would trip the code here, but I tested it and it's all good.

LGTM

@jhchabran jhchabran force-pushed the bahrmichael/restrict-image-sizes branch from d8d000e to a6e358e Compare May 13, 2024 09:05
@jhchabran jhchabran enabled auto-merge (squash) May 13, 2024 09:07
@jhchabran jhchabran merged commit a71189b into main May 13, 2024
@jhchabran jhchabran deleted the bahrmichael/restrict-image-sizes branch May 13, 2024 09:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants