This GitHub Action will setup a Nushell environment for you.

Overview

setup-nu

中文说明

build

This GitHub Action will setup a Nushell environment for you.

Usage

Examples

In most cases you need to specify the version of Nushell to be used in your workflow. For example the following installs the v0.62.0 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: hustcer/setup-nu@v1
  with:
    version: 0.62.0
- run: $'Nu version info:(char nl)'; version
  shell: nu {0}
- name: Default shell will be `nu`
  shell: nu {0}
  run: |
    $'Nu path:(which nu)(char nl)'
    def greeting [name: string] {
        print $'Hello ($name)'
    }
    greeting hustcer

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

name: basic

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

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

Or, check the following examples:

  1. run-test.yaml
  2. run-matrix.yaml

If you want to use the latest version of nushell you can specify this by set check-latest to true(it's the same as version: '*', but more readable). For example the following installs the latest version:

- uses: hustcer/setup-nu@v1
  with:
    check-latest: true
- run: $'Nu version info:(char nl)'; version

Note: Before Nushell reaches 1.0, each version may change a lot, it is recommend that you use a specified version instead.

In rare circumstances you might get rate limiting errors, this is because this workflow has to make requests to GitHub API in order to list available releases. If this happens you can set the GITHUB_TOKEN environment variable.

- uses: hustcer/setup-nu@v1
  with:
    version: 0.62.0
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Inputs

Name Required Description Type Default
version no A valid NPM-style semver specification. string *
check-latest no Set to true if you want to use the latest version bool false

The semver specification is passed directly to NPM's semver package. This GitHub Action will install the latest matching release.

License

Licensed under:

You might also like...

Create a new project with Next.js, TypeScript, Eslint, Prettier in just 1 second and you don't need to setup anything.

Create a new project with Next.js, TypeScript, Eslint, Prettier in just 1 second and you don't need to setup anything.

Next + TypeScript + Eslint + Prettier Template 🔥 Create a new project with Next.js, TypeScript, Eslint, Prettier in just 1 second and you don't need

Oct 2, 2022

A github action that provides detailed bundle analysis on PRs for next.js apps

A github action that provides detailed bundle analysis on PRs for next.js apps

Next.js Bundle Analysis Github Action Analyzes each PR's impact on your next.js app's bundle size and displays it using a comment. Optionally supports

Dec 27, 2022

A GitHub Action for pushing to a repo.

action-gh-push A GitHub Action for pushing to a repo. 🤸 Usage Below is a simple example of step.if tag gating name: ci on: push jobs: build:

Feb 15, 2022

A GitHub Action to cache your workload to a Google Cloud Storage bucket.

A GitHub Action to cache your workload to a Google Cloud Storage bucket.

Google Cloud Storage Cache Action GitHub already provides an awesome action to cache your workload to Azure's servers hosted in United States. However

Dec 15, 2022

🤖 GitHub Action which creates Issues from comments in your code

🤖 GitHub Action which creates Issues from comments in your code

todo-issue[action] Disclosure Huge thanks to JasonEtco! After he decided to shut down his todo[bot] I've looked around for alternatives but decided to

Dec 11, 2022

GitHub action to install Foundry

foundry-toolchain Action This GitHub action installs Foundry. Example workflow on: [push] name: test jobs: check: name: Foundry project ru

Jan 5, 2023

Github action to parse OWNERS files and outputs random reviewers

Get Owners Github Action Do you want to have all the approvers and reviewers without having strange scripts in your actions? Do you want to have rando

Oct 22, 2022

GitHub action code for VMware Image Builder (VIB).

VMware Image Builder Overview This GitHub Action allows to interact with the VMware Image Builder service from VMware, a.k.a. VIB. VIB is a SaaS servi

Dec 22, 2022

⚙️ A GitHub Action to push a feed item to RSS3 network

RSS3 Github Action Update a users feed to reflect changes in a Github Repository. Setup Have a copy of your private key Add an environment secret to y

Apr 26, 2022
Comments
  • `/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found` for nu v0.72

    `/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found` for nu v0.72

    Get error messages like:

    /opt/hostedtoolcache/nushell/0.72.0/x64/nu: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /opt/hostedtoolcache/nushell/0.72.0/x64/nu)
    

    while using nu v0.72, for more detail: https://github.com/hustcer/setup-nu/actions/runs/3581284227/jobs/6024177325

    opened by hustcer 1
  • chore(deps): bump @actions/core from 1.8.2 to 1.9.1

    chore(deps): bump @actions/core from 1.8.2 to 1.9.1

    Bumps @actions/core from 1.8.2 to 1.9.1.

    Changelog

    Sourced from @​actions/core's changelog.

    1.9.1

    • Randomize delimiter when calling core.exportVariable

    1.9.0

    • Added toPosixPath, toWin32Path and toPlatformPath utilities #1102
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(v3.2)
Owner
Justin Ma
不鸣不飞
Justin Ma
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
A custom action for setting GitHub Workflow environment variables with YAML configuration files.

yaml-env-action - A custom action for setting GitHub Workflow environment variables with YAML configuration files. Introduction yaml-env-action is a c

Piper Dougherty 3 Dec 13, 2022
mirrord lets you easily mirror traffic from your production environment to your development environment.

mirrord lets you easily mirror traffic from your Kubernetes cluster to your development environment. It comes as both Visual Studio Code extension and a CLI tool.

MetalBear 2.1k Dec 24, 2022
Quickly create an anchor program from templates and setup anchor dev environment.

Create Anchor App Quickly create an anchor program from templates and setup anchor dev environment. Example Installation npm i -g @create-anchor-app/c

null 24 Nov 28, 2022
GitHub Action that posts the report in a comment on a GitHub Pull Request from coverage data generated by nyc (istanbul)

GitHub Action: Report NYC coverage GitHub Action that posts the report in a comment on a GitHub Pull Request from coverage data generated by nyc (ista

Sid 16 Nov 23, 2022
A GitHub action to submit your dependency graph from your Mill build to GitHub.

Mill Dependency Submission A GitHub action to submit your dependency graph from your Mill build to GitHub via their Dependency Submission API. The mai

Chris Kipp 6 Dec 15, 2022
A GitHub Action that allows to debug GitHub workflows using VS Code.

VS Code Server Action A GitHub Action that allows to debug GitHub workflows using VS Code. Failing CI builds can be annoying especially since we don't

stateful 18 Dec 23, 2022
Github action to collect metrics (CPU, memory, I/O, etc ...) from your workflows to help you debug and optimize your CI/CD pipeline

workflow-telemetry-action A GitHub Action to track and monitor the resource metrics of your GitHub Action workflow runs. If the run is triggered via a

Thundra 32 Dec 30, 2022