Skip to content

A2-ai/setup-rv

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-rv

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

  • Install a version of rv and add it to PATH
  • Use the latest version or specify a particular version
  • Support for various platforms and architectures

Contents

Usage

Install the latest version (default)

- name: Install the latest version of rv
  uses: a2-ai/setup-rv@v1

If you do not specify a version, this action will install the latest version.

Install a specific version

- name: Install a specific version of rv
  uses: a2-ai/setup-rv@v1
  with:
    version: "0.4.1"

Working directory

You can set the working directory with the working-directory input:

- name: Install rv
  uses: a2-ai/setup-rv@v1
  with:
    working-directory: my/subproject/dir

GitHub authentication token

This action uses the GitHub API to fetch the rv release artifacts. To avoid hitting the GitHub API rate limit too quickly, an authentication token can be provided via the github-token input. By default, the GITHUB_TOKEN secret is used, which is automatically provided by GitHub Actions.

- name: Install the latest version of rv with a custom GitHub token
  uses: a2-ai/setup-rv@v1
  with:
    github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}

Outputs

This action provides the following outputs:

  • rv-version: The version of rv that was installed
  • rv-path: The path to the installed rv binary

Example usage of outputs:

- name: Install the latest version of rv
  id: setup-rv
  uses: a2-ai/setup-rv@v1

- name: Print rv version
  run: echo "Installed rv version is ${{ steps.setup-rv.outputs.rv-version }}"

How it works

This action downloads rv from the rv repo's official GitHub Releases and adds it to the PATH, enabling later steps to invoke it by name (rv).

FAQ

What is the default version?

By default, this action installs the latest version of rv.

If you require the installed version in subsequent steps of your workflow, use the rv-version output:

- name: Install the default version of rv
  id: setup-rv
  uses: a2-ai/setup-rv@v1
- name: Print the installed version
  run: echo "Installed rv version is ${{ steps.setup-rv.outputs.rv-version }}"

Do I have to run actions/checkout before or after setup-rv?

Some workflows need rv but do not need to access the repository content.

But if you need to access the repository content, you have run actions/checkout before running setup-rv. Running actions/checkout after setup-rv is not supported.

Development

This action can be built using bun by running

bun run build

To update the dist/ dir with the latest changes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published