Skip to content
terminal

GitHub Action

Ritchie CLI Action

v1 Latest version

Ritchie CLI Action

terminal

Ritchie CLI Action

Github Action to run Ritchie CLI commands on any OS runner ⚙️🖥

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Ritchie CLI Action

uses: GuillaumeFalourd/ritchie-cli-action@v1

Learn more about this action in GuillaumeFalourd/ritchie-cli-action

Choose a version

Ritchie CLI Action

Action test on Ubuntu Action test on MacOs Action test on Windows

title

Github Action to run Ritchie CLI commands on any OS runner ⚙️🖥


📚 Usage

Who is using this action? 🧑‍💻

Requirements

⚠️ The actions/checkout is mandatory to use this action on WINDOWS RUNNER, as the repository root is used to install and execute Ritchie binary.

⚠️ Actions to setup environments may be necessary to use this action depending on the runner or the programming language that will be used to run or build the formula. For example:


♻️ Scenarios

Run rit formula from PUBLIC Github repository

    runs-on: ubuntu-latest OR macos-latest
    steps:
      - uses: GuillaumeFalourd/ritchie-cli-action@v1
        with:
          rit_formula_command: rit demo coffee-python --rit_name=Dennis --rit_coffee_type=espresso --rit_delivery=false
          rit_repo_url: https://github.com/ZupIT/ritchie-formulas-demo

    runs-on: windows-latest
    steps:
      - uses: GuillaumeFalourd/ritchie-cli-action@v1
        with:
          rit_formula_command: ./rit.exe demo coffee-python --rit_name=Dennis --rit_coffee_type=espresso --rit_delivery=false
          rit_repo_url: https://github.com/ZupIT/ritchie-formulas-demo

Run rit formula from PRIVATE Github repository

    runs-on: ubuntu-latest OR macos-latest
    steps:
      - uses: GuillaumeFalourd/ritchie-cli-action@v1
        with:
          rit_formula_command: rit python math sum numbers --number_one=1 --number_two=2
          rit_repo_url: https://github.com/GuillaumeFalourd/formulas-training
          access_token: ${{ secrets.ACCESS_TOKEN }}

    runs-on: windows-latest
    steps:
      - uses: GuillaumeFalourd/ritchie-cli-action@v1
        with:
          rit_formula_command: ./rit.exe python math sum numbers --number_one=1 --number_two=2
          rit_repo_url: https://github.com/GuillaumeFalourd/formulas-training
          access_token: ${{ secrets.ACCESS_TOKEN }}

▶️ Action Inputs

Field Mandatory Observation
rit_formula_command YES Ritchie formula command line WITH rit prefix (UNIX) or ./rit.exe prefix (WINDOWS).
e.g: rit demo hello-world
e.g: ./rit.exe demo hello-world
rit_repo_url YES Github repository where the formula's code is located.
e.g: https://github.com/ZupIT/ritchie-formulas-demo
access_token NO Github Personal Access Token with access to the private formulas repository to import.

Note: Formula's generated outputs (files or directories) will be located at the repository root ($GITHUB_WORKSPACE).


Licensed

This repository uses the Apache License 2.0