> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mirurobotics.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub actions

export const Framed = ({image, background, link, alt = "Framed content", borderWidth = "24px", outerRadius = "10px", innerRadius = "6px"}) => {
  const parseShorthand = value => {
    const values = String(value).trim().split(/\s+/);
    switch (values.length) {
      case 1:
        return [values[0], values[0], values[0], values[0]];
      case 2:
        return [values[0], values[1], values[0], values[1]];
      case 3:
        return [values[0], values[1], values[2], values[1]];
      default:
        return values.slice(0, 4);
    }
  };
  const isZero = v => parseFloat(v) === 0;
  const padding = parseShorthand(borderWidth);
  const outer = parseShorthand(outerRadius);
  const cornerMasks = [];
  if (isZero(padding[0]) && isZero(padding[3])) {
    cornerMasks.push(`radial-gradient(circle at 0% 0%, transparent ${outer[0]}, black ${outer[0]})`);
  }
  if (isZero(padding[0]) && isZero(padding[1])) {
    cornerMasks.push(`radial-gradient(circle at 100% 0%, transparent ${outer[1]}, black ${outer[1]})`);
  }
  if (isZero(padding[2]) && isZero(padding[1])) {
    cornerMasks.push(`radial-gradient(circle at 100% 100%, transparent ${outer[2]}, black ${outer[2]})`);
  }
  if (isZero(padding[2]) && isZero(padding[3])) {
    cornerMasks.push(`radial-gradient(circle at 0% 100%, transparent ${outer[3]}, black ${outer[3]})`);
  }
  const backgroundMask = cornerMasks.length > 0 ? cornerMasks.join(", ") : undefined;
  const innerImage = <img src={image} alt={alt} noZoom={link ? true : false} style={{
    display: "block",
    width: "100%",
    margin: 0,
    borderRadius: 0
  }} />;
  return <div style={{
    display: "inline-block",
    position: "relative",
    borderRadius: outerRadius,
    overflow: "hidden"
  }}>
            {}
            {background && <div style={{
    position: "absolute",
    inset: 0,
    backgroundImage: `url(${background})`,
    backgroundSize: "cover",
    maskImage: backgroundMask,
    WebkitMaskImage: backgroundMask,
    maskComposite: "intersect",
    WebkitMaskComposite: "source-in"
  }} />}
            {}
            <div style={{
    position: "relative",
    padding: borderWidth
  }}>
                <div style={{
    borderRadius: innerRadius,
    overflow: "hidden",
    lineHeight: 0
  }}>
                    {link ? <a href={link}>{innerImage}</a> : innerImage}
                </div>
            </div>
        </div>;
};

<Framed background="https://assets.mirurobotics.com/docs/v04/images/developers/background.jpeg" image="https://assets.mirurobotics.com/docs/v04/images/releases/header:gh-actions.png" borderWidth="28px 0 0 48px" innerRadius="8px 0 0 0" outerRadius="10px" />

Miru provides an official action for installing the Miru CLI. You can find it on GitHub at [mirurobotics/setup-cli](https://github.com/mirurobotics/setup-cli).

## Usage

Since the CLI is still in beta, we highly recommend [pinning to a specific version](#pin-a-specific-version) to ensure a stable and predictable environment.

You can find the CLI changelog in the [CLI changelog](/changelog/cli).

### Basic usage

After installing the Miru CLI, specify the `MIRU_API_KEY` environment variable to authenticate the CLI. Then, run any CLI commands you need to perform.

```yaml theme={null}
steps:
  - uses: actions/checkout@v6

  - name: Setup Miru CLI
    uses: mirurobotics/setup-cli@v0.2
    with:
      version: 'v0.10.1'

  - name: Run your CI task here
    env:
      MIRU_API_KEY: ${{ secrets.MIRU_API_KEY }}
    run: |
      # simply prints out the version of the CLI
      miru version
```

### Pin a specific version

Pinning to a specific CLI version ensures a stable and predictable environment. You will need to manually update the version to receive bug fixes and improvements.

To pin to a specific version, use the `version` input with the exact CLI version number:

```yaml theme={null}
steps:
  - uses: actions/checkout@v6

  - name: Setup Miru CLI (v0.10.1)
    uses: mirurobotics/setup-cli@v0.2
    with:
      version: 'v0.10.1'
```

### Pin a minor version

Pinning to a minor version installs the latest release within that minor version range (e.g., `v0.10` installs the latest `v0.10.x`). This automatically picks up backwards-compatible bug fixes, but may introduce unexpected changes.

```yaml theme={null}
steps:
  - uses: actions/checkout@v6

  - name: Setup Miru CLI (latest v0.10.x)
    uses: mirurobotics/setup-cli@v0.2
    with:
      version: 'v0.10'
```

## Inputs

<ParamField path="version" type="string">
  Miru version of the CLI to install. Supports exact (`v0.10.1`) and minor (`v0.10`) versions. We recommend pinning to an exact version for a stable, predictable environment.

  Omit or use `latest` for the most recent release. However, this is not recommended as it may introduce breaking changes.
</ParamField>

## Outputs

<ResponseField name="version" type="string" required>
  The version of the Miru CLI that was installed.
</ResponseField>

## Supported platforms

This action supports the following runner environments:

| OS    | Architecture   |
| ----- | -------------- |
| Linux | x86\_64, arm64 |

<Warning> Windows and macOS runners are not currently supported. </Warning>

## Example

### Create a release

The following GitHub Actions workflow creates a release when a tag is pushed to the repository.

To use the workflow, place it in the `.github/workflows` directory of your repository (e.g., `.github/workflows/create-miru-release.yml`).

```yaml .github/workflows/create-miru-release.yml theme={null}
name: Create Miru Release

on:
  push:
    tags: 
      - '*'

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - name: Setup Miru CLI
        uses: mirurobotics/setup-cli@v0.2
        with:
          version: 'v0.10.1'

      - name: Create the release
        env:
          MIRU_API_KEY: ${{ secrets.MIRU_API_KEY }}
        run: |
          miru release create \
            --version "${{ github.ref_name }}" \
            --schemas ./schemas
```

**CLI command**

The `--version` flag is used to specify the release's `version`, which is the tag pushed to the repository in this example. The `--schemas` flag is used to specify the directory containing the schemas to include in the release.

For a comprehensive guide on creating releases, visit the [define releases](/cfg-mgmt/create-a-release) documentation. For a concise reference of the CLI command, visit the [CLI Reference](/references/cli/release-create).

**API key scopes**

The API key scopes required to create a release are listed in the create release command's [API key scopes](/references/cli/release-create#api-key-scopes) section.
