Code Monkey home page Code Monkey logo

ci's Introduction

Dev Container Build and Run (devcontainers/ci)

The Dev Container Build and Run GitHub Action is aimed at making it easier to re-use Dev Containers in a GitHub workflow. The Action supports using a Dev Container to run commands for CI, testing, and more, along with pre-building a Dev Container image. Dev Container image building supports Dev Container Features and automatically places Dev Container metadata on an image label for simplified use.

NOTE: The Action is not currently capable of taking advantage of pre-built Codespaces. However, pre-built images are supported.

A similar Azure DevOps Task is also available!

Note that this project builds on top of @devcontainers/cli which can be used in other automation systems.

Quick start

Here are three examples of using the Action for common scenarios. See the documentation for more details and a list of available inputs.

Pre-building an image:

- name: Pre-build dev container image
  uses: devcontainers/[email protected]
  with:
    imageName: ghcr.io/example/example-devcontainer
    cacheFrom: ghcr.io/example/example-devcontainer
    push: always

Using a Dev Container for a CI build:

- name: Run make ci-build in dev container
  uses: devcontainers/[email protected]
  with:    
    # [Optional] If you have a separate workflow like the one above
    # to pre-build your container image, you can reference it here
    # to speed up your application build workflows as well!
    cacheFrom: ghcr.io/example/example-devcontainer

    push: never
    runCmd: make ci-build

Both at once:

- name: Pre-build image and run make ci-build in dev container
  uses: devcontainers/[email protected]
  with:
    imageName: ghcr.io/example/example-devcontainer
    cacheFrom: ghcr.io/example/example-devcontainer
    push: always
    runCmd: make ci-build

CHANGELOG

Version 0.3.0 (24th February 2023)

This version updates the release mechanism for the GitHub action so that only the compiled JavaScript is included in the release. The primary motivation is to simplify the process for contributing to the action, but a side-benefit should be a reduced download size when using the action.

Version 0.2.0

This version updates the implementation to use @devcontainers/cli.

This brings many benefits around compatibility with Dev Containers. One key area is that Dev Container Features can now be used in CI along with recent enhancements like image label support.

Version 0.1.x

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

ci's People

Contributors

stuartleeks avatar dependabot[bot] avatar chrmarti avatar chuxel avatar bamurtaugh avatar natescherer avatar sauravmaheshkar avatar nmemoto avatar samruddhikhandale avatar korverdev avatar devidw avatar edxu96 avatar jkeech avatar trxcllnt avatar ross-p-smith avatar jjliggett avatar k-taro56 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.