devcontainers/ci contains a GitHub action and Azure DevOps task aimed at making it easier to re-use a development 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: devcontainers/ci@v0.2
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: DevcontainersCI@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 Dev 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