Skip to content

Set up your GitHub Actions workflow with a specific version of Lando.

License

Notifications You must be signed in to change notification settings

lando/setup-lando

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

Setup Lando

This action installs Lando in GitHub Actions. With it you can:

  • Install using a version-spec-ish eg 3, 3.12, 3.x, 3.14.0
  • Install using convenience aliases eg stable, 4-latest, dev 3-edge
  • Install preview branches eg pm-preview
  • Install from a URL eg https://github.com/lando/cli/releases/download/v3.18.0/lando-linux-x64-v3.18.0
  • Install from a local file eg /home/runner/work/setup-lando/setup-lando/bin/lando
  • Set global Lando config configuration
  • Specify how, or if, lando setup should run
  • Toggle lando debugging via GitHub Actions
  • Verify underlying engine and orchestrator dependencies are installed and correct

NOTE: If you are using a self-hosted or custom runner you may need to install the needed Lando dependenices eg Docker and Docker Compose for Lando to work correctly!

Inputs

All inputs are optional. If you do nothing the latest stable Lando will be installed.

Name Description Default Example
lando-version The version of Lando to install. If set this has primacy over lando-version-file. stable 3.14.0
lando-version-file A file that contains the version of Lando to install. .lando-version .tool-versions
config A list of . delimited config. If set these have primacy over values in config-file null engineConfig.port=2376
config-file The path to a Lando global config file to use. null /config/lando-global.yml
setup The lando setup command to run. lando setup -y lando setup --skip-common-plugins --plugin @lando/core@~/path/to/core -y
  • Note that setup is only available in Lando 3.21+

Outputs

outputs:
  lando-path:
    description: "The path to the installed version of Lando."
    value: ${{ steps.setup-lando.outputs.lando-path }}

Usage

Basic Usage

- name: Setup Lando
  uses: lando/setup-lando@v2

Advanced Usage

Version examples:

- name: Setup Lando
  uses: lando/setup-lando@v2
  with:
    lando-version: stable | edge | dev | latest | 3 | 3.14.0 | 3.11 | pm-preview
- name: Setup Lando
  uses: lando/setup-lando@v2
  with:
    lando-version: https://url.to.my.lando.cli
- name: Setup Lando
  uses: lando/setup-lando@v2
  with:
    lando-version: /path/to/my/lando/cli

Version spec and config file example:

- name: Setup Lando
  uses: lando/setup-lando@v2
  with:
    lando-version: ">2"
    config-file: config.yaml

Version file and config list example:

- name: Setup Lando
  uses: lando/setup-lando@v2
  with:
    lando-version-file: .tool-versions
    config: |
      core.engine=docker-colima
      core.telemetry=false
      plugins.@lando/php=/home/runner/work/php/php

Version file and config list example:

- name: Setup Lando
  uses: lando/setup-lando@v2
  with:
    lando-version-file: .tool-versions
    config: |
      core.engine=docker-colima
      core.telemetry=false
      plugins.@lando/php=/home/runner/work/php/php

NOTE: The above config is meant purely for illustration.

Setup example:

- name: Setup Lando
  uses: lando/setup-lando@v2
  with:
    lando-version: 3-dev
    setup: auto | off | disable | lando setup --orchestrator 2.21.0 -y

Everything, everywhere, all at once example:

- name: Setup Lando
  uses: lando/setup-lando@v2
  with:
    architecture: x64
    config: |
      core.engine=docker-colima
      core.telemetry=false
      plugins.@lando/php=/home/runner/work/php/php
    config-file: config.yaml
    debug: true
    dependency-check: error|warn|false
    lando-version: 3.14.0
    lando-version-file: .tool-versions
    os: macOS
    telemetry: false
    token: ${{ github.token }}
    setup: lando setup --orchestrator 2.22.0 --plugins @pirog/my-plugin -y

Changelog

We try to log all changes big and small in both THE CHANGELOG and the release notes.

Releasing

Create a release and publish to GitHub Actions Marketplace. Note that the release tag must be a semantic version.

Contributors

Made with contrib.rocks.

Other Resources