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

"Everything in one step" approach clashes with workflows where the dev container is treated as one target platform. #281

Open
dabrahams opened this issue Mar 4, 2024 · 6 comments
Assignees
Labels
feature New feature

Comments

@dabrahams
Copy link

It's awkward that, if there are 10 linearly-dependent steps to testing my project, I have to put them all into one devcontainer runCmd when the devcontainer is treated as a target platform in my matrix strategy. All the other platforms get distinct workflow steps but I have to intentionally not run any of those on the dev container and instead run one unified step.

@chrmarti
Copy link
Collaborator

There is no GitHub action runtime inside the dev container that could execute the part of your workflow steps that should run in side the container.

You could use multiple devcontainers/ci action steps though. Does that not work as expected?

@chrmarti chrmarti self-assigned this Apr 10, 2024
@chrmarti chrmarti added the info-needed Issue requires more information from poster label Apr 10, 2024
@dabrahams
Copy link
Author

It works when it works. I suppose if the step just modifies the filesystem, that's most of the time. However, I still can't describe my CI process in one way that works both on the devcontainer and natively, which means I either need to duplicate and conditionalize each step, or I separate the devcontainer testing from native platform tests.

@chrmarti
Copy link
Collaborator

GitHub Actions support running a job in a container: https://docs.github.com/en/actions/using-jobs/running-jobs-in-a-container

There is currently no support for dev containers for this, but that seems to be the direction you would like us to go.

@chrmarti chrmarti added feature New feature and removed info-needed Issue requires more information from poster labels Apr 19, 2024
@dabrahams
Copy link
Author

That sounds promising indeed!

@dabrahams
Copy link
Author

Another possibility would be to provide a shell: setting that causes a run command to run in the devcontainer. That would cover most of my problems.

@chrmarti
Copy link
Collaborator

Maybe the custom shell support could be used for doing this: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#custom-shell

I guess currently you might need a helper script to act as the custom shell to make it work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants