Refactor proxy Docker workflows for PR builds, releases, and fork compatibility#26
Open
Refactor proxy Docker workflows for PR builds, releases, and fork compatibility#26
Conversation
5c5323a to
f314530
Compare
…patibility - add pull_request support for proxy image validation - add workflow_dispatch support for manual Docker runs on main or tags - make image naming fork-friendly via repository owner fallback - centralize image tag and version computation in a metadata step - skip DockerHub login and publishing for PR builds - build the image locally for Anchore/Grype scanning before publish - upload SARIF results only for non-PR runs, and only for workflow_dispatch on main - keep multi-arch image publishing for develop and release tags - skip SonarQube when SONAR_TOKEN is not configured - skip SonarQube for fork PRs because repository secrets are unavailable there - add a release workflow for creating and publishing tagged releases - pin and refresh GitHub Action SHAs This improves the proxy CI/CD setup by making PR validation work in forks, keeping publishing restricted to trusted runs, and adding a cleaner manual and release flow for versioned Docker images.
f314530 to
22cbf53
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Improve the proxy GitHub Actions workflows to better support pull requests, forks, manual runs, and releases.
This updates the Docker image workflow so PRs can validate builds without publishing, makes the workflow safer for fork-based contributions, adds image vulnerability scanning before publish, and introduces a separate release workflow for creating tagged releases.
Changes
Docker image workflow
pull_requestsupport for image validationworkflow_dispatchsupport for manual runsmainor on a tagmainbranch runs asdevelopbuildsvars.DOCKERHUB_NAMESPACE || github.repository_ownerworkflow_dispatchonmaindevelopand release tagsSONAR_TOKENis not configuredRelease workflow
releaseevent flowBehavior
Pull requests
SONAR_TOKENis configuredPush to
maindevelopmulti-arch imageSONAR_TOKENis configuredRelease
latestalongside the versioned tagSONAR_TOKENis configuredManual dispatch
mainor on a tagmain, behaves like adevelopbuildWhy
These changes make the workflows more contributor-friendly by allowing PR validation without requiring publish credentials or secrets from forks.
They also improve maintainability by centralizing tag computation and separating release creation from image publishing.
Finally, they add a security check before publishing by scanning the built image during CI.
Notes