Skip to content

This GitHub Action will setup a Couchbase Shell environment for you.

License

Notifications You must be signed in to change notification settings

ldoguin/setup-cbsh

 
 

Repository files navigation

setup-cbsh

Originally forked from https://github.com/hustcer/setup-nu/, many thanks to [hustcer](https://github.com/hustcer

Latest Main Check

This GitHub Action will setup a Couchbase Shell environment for you.

Usage

Examples

Basic

In most cases you just need to specify the version of Nushell to be used in your workflow. For example the following installs the v0.80 version of Nushell. Then you can set the command you want to run in the following steps, and don't forget to set shell: nu {0} to make the commands be executed by nu:

- uses: ldoguin/setup-cbsh@v1
  with:
    version: "v0.75.2" # Don't use 0.90 here, as it was a float number and will be convert to 0.9, you can use v0.90/0.90.0 or '0.90'
- run: print $'Nu version info:(char nl)'; version
  shell: cbsh {0}
- name: Default shell will be `nu`
  shell: cbsh {0}
  run: |
    print $'Nu path:(which cbsh)(char nl)'
    def greeting [name: string] {
        print $'Hello ($name)'
    }
    greeting hustcer

Used as Default Shell

Of cause, You can also set the default shell to cbsh by setting the defaults.run.shell config:

name: basic

on: push
defaults:
  run:
    shell: cbsh {0}

jobs:
  basic-usage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]
      - uses: ldoguin/setup-cbsh@main
        with:
          version: "*"
      - run: version; print $"(char nl)Dir contents:(char nl)"; ls ((which cbsh).path.0 | path dirname)
      - run: |
          print $'Current env:(char nl)'
          print $env
      - name: You can run bash commands, too
        run: pwd && ls -la
        shell: bash

License

Licensed under:

About

This GitHub Action will setup a Couchbase Shell environment for you.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 56.4%
  • Nushell 29.4%
  • Just 12.2%
  • Shell 2.0%