Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Launch workshop action

This action launches an ephemeral development environment using Workshop.

Tests Check dist Coverage

Usage

- uses: canonical/launch-workshop@v1
  with:
    # Channel used to install Workshop snap.
    # Optional.
    channel: latest/stable

    # Specific revision of Workshop snap to install.
    # Optional.
    revision: ''

    # Directory containing a workshop to launch.
    # Optional.
    project: .

    # Name of workshop to launch.
    # Required if the project has multiple workshops.
    workshop: dev

    # Mount plugs to cache across workflow runs.
    # Each line has the format <SDK>:<PLUG>.
    # Optional.
    cache: ''

Example jobs

Single workshop

runs-on: ubuntu-latest
steps:
  - uses: actions/checkout@v4

  - uses: canonical/launch-workshop@v1

  - run: workshop exec -- pytest

Multiple workshops

runs-on: ubuntu-latest
strategy:
  matrix:
    workshop: [dev-jammy, dev-noble]
steps:
  - uses: actions/checkout@v4

  - uses: canonical/launch-workshop@v1
    with:
      workshop: ${{ matrix.workshop }}

  - run: workshop run "$WS" unit-tests
    env:
      WS: ${{ matrix.workshop }}

Caching

Workshop SDKs can define mount plugs to persist data outside the workshop container. For example, the go SDK defines a mod-cache plug:

$ workshop connections --all
Interface  Plug              Slot              Notes
mount      dev/go:mod-cache  dev/system:mount  -

Use the cache input to cache such data across workflow runs:

- uses: canonical/launch-workshop@v1
  with:
    cache: |
      go:mod-cache
      rust:cargo-registry
      uv:cache

About

GitHub Action to launch a workshop

Topics

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages