mise-action/README.md
jdx a545a9b90a
pinning (#213)
* pinning

Fixes #205

* gh

* gh

* gh

* gh

* docs
2023-12-14 12:39:54 +00:00

1 KiB

Example Workflow

name: test
on:
  pull_request:
    branches:
      - main
  push:
    branches:
      - main
jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: jdx/rtx-action@v1
        with:
          version: 2023.12.0 # [default: latest] rtx version to install
          install: true # [default: true] run `rtx install`
          cache: true # [default: true] cache rtx using GitHub's cache
          tool_versions: |
            shellcheck 0.9.0
      - run: shellcheck scripts/*.sh
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: jdx/rtx-action@v1
      # .tool-versions will be read from repo root
      - run: node ./my_app.js

Alternatively, rtx is easy to use in GitHub Actions even without this:

jobs:
  build:
    steps:
    - run: |
        curl https://rtx.jdx.dev/install.sh | sh
        echo "$HOME/.local/share/rtx/bin" >> $GITHUB_PATH
        echo "$HOME/.local/share/rtx/shims" >> $GITHUB_PATH