Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
box

GitHub Action

Dev Container Build and Run Action

v0.2.1900000021 Pre-release

Dev Container Build and Run Action

box

Dev Container Build and Run Action

Action to simplify using Dev Containers (https://containers.dev) in GitHub workflows

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Dev Container Build and Run Action

uses: devcontainers/[email protected]

Learn more about this action in devcontainers/ci

Choose a version

devcontainer-build-run

devcontainer-build-run is the start of 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.

Status: this is a pet project that I've been experimenting with. It is not supported and you should expect bugs :-)

NOTE: Currently, the devcontainer-build-run action only supports Dockerfile-based dev containers

GitHub Action

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

Azure DevOps Task

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