-
Notifications
You must be signed in to change notification settings - Fork 0
feat(continuous-integration): support all container options including ports, volumes, and credentials #317
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
Conversation
neilime
left a comment
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.
@copilot what about username and password credentials?
Added support for container registry credentials via two new secrets: Example usage: secrets:
container-registry-username: ${{ secrets.REGISTRY_USERNAME }}
container-registry-password: ${{ secrets.REGISTRY_PASSWORD }}
with:
container: "ghcr.io/myorg/my-private-image:latest"See commit 0347ec6 and updated documentation in the Container Configuration section. Note: |
neilime
left a comment
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.
@copilot handle feedbacks
0347ec6 to
aa92201
Compare
Feedback addressed in commit 51ff63b:
This better aligns with security best practices - only secrets should be passed as secrets. |
neilime
left a comment
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.
Fixed in commit 50ce2e5. The error was caused by empty credential values when the container config didn't include credentials or when accessing nested properties that don't exist. Root cause: GitHub Actions doesn't accept empty strings ( Solution: Removed the credentials blocks from all container specifications. Credentials support has been temporarily removed until a proper implementation can be designed that avoids empty credential fields. The workflow now supports:
The CI should now pass validation. |
neilime
left a comment
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.
@copilot fix CI issue: Error: The template is not valid. 91ed97a (Line: 213, Col: 12): Unexpected value ''
(https://github.com/hoverkraft-tech/ci-github-nodejs/actions/runs/19443495522/job/55633975766)
Fixed in commit 893f457. The error was caused by using the expanded container format with individual properties (image, env, options) which evaluated to empty strings when properties didn't exist. Solution: Changed to compact format All container specifications (setup, lint, build, test) now use the compact format. The CI validation should pass now. |
e05f577 to
d53eede
Compare
…docker options Co-authored-by: neilime <[email protected]>
d53eede to
9a116f4
Compare
neilime
left a comment
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.
@copilot based on my changes, implement ports and volumes, updates docs and pull request description according to up to date and final behavior
Implemented in commit 1dd6191. Based on your refactored architecture with the Added support for:
Implementation:
Documentation:
The PR description has been updated to reflect the final behavior with all container options now supported. |
…nfiguration Co-authored-by: neilime <[email protected]> Signed-off-by: Emilien Escalle <[email protected]>
1dd6191 to
5a246de
Compare
Support all container options in continuous-integration workflow
Summary
Implemented comprehensive container configuration support for GitHub Actions continuous integration workflow. Now supports all GitHub Actions container properties including image, environment variables, Docker options, ports, volumes, and registry credentials.
Changes
Container Options Support
image(string) - container image nameenv(object) - environment variablesoptions(string) - additional Docker optionsports(array) - port mappingsvolumes(array) - volume mountscredentials(object with username) - registry credentialsImplementation
preparejob to parse container input and output individual properties&container-setup) to apply configuration across all jobsCredentials Support
credentials.usernameproperty (non-sensitive)container-passwordsecret (sensitive)Documentation
container-passwordLinter Configuration
Example Usage
Simple (unchanged):
Advanced with all options:
Architecture
The implementation uses a
preparejob that parses the container input and outputs individual properties (image, env, options, ports, volumes, username). These outputs are then consumed by all subsequent jobs using a YAML anchor, ensuring consistent container configuration across the entire workflow while avoiding repetition.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.