Dev Container Build and Run Action
ActionsVerified
devcontainer-build-run contains a GitHub action and Azure DevOps task aimed at making it easier to re-use a Visual Studio Code dev container in a GitHub workflow or Azure DevOps pipeline.
This project builds on top of @devcontainers/cli
The example below shows usage of the GitHub Action - see the GitHub Action documentation for more details:
- name: Build and run dev container task
uses: stuartleeks/[email protected]
with:
imageName: ghcr.io/example/example-devcontainer
runCmd: make ci-build
The example below shows usage of the Azure DevOps Task - see the Azure DevOps Task documentation for more details:
- task: DevContainerBuildRun@0
inputs:
imageName: 'yourregistry.azurecr.io/example-dev-container'
runCmd: 'make ci-build'
sourceBranchFilterForPush: refs/heads/main
This version updates the implementation to use @devcontainers/cli.
This brings many benefits around compatibility with VS Code Remote-Containers. One key area is that container-features can now be used in CI.
In theory, docker-compose based dev containers should also work however these are currently untested and image caching is blocked on this issue
0.1.x versions were the initial version of the action/task and attempted to mimic the behaviour of dev containers with manual docker
commands
Dev Container Build and Run Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.