mise-action/README.md

54 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

# Example Workflow
2023-01-14 08:11:40 -06:00
```yaml
2023-02-21 23:34:44 -06:00
name: test
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
2024-01-10 07:57:15 -06:00
- uses: jdx/mise-action@v2
2023-02-21 23:34:44 -06:00
with:
2024-01-02 16:16:49 -06:00
version: 2023.12.0 # [default: latest] mise version to install
install: true # [default: true] run `mise install`
install_args: "bun" # [default: ""] additional arguments to `mise install`
2024-01-02 16:16:49 -06:00
cache: true # [default: true] cache mise using GitHub's cache
# automatically write this .tool-versions file
experimental: true # [default: false] enable experimental features
2024-05-12 10:19:03 -05:00
log_level: debug # [default: info] log level
2023-02-21 23:34:44 -06:00
tool_versions: |
shellcheck 0.9.0
2024-01-02 16:16:49 -06:00
# or, if you prefer .mise.toml format:
mise_toml: |
[tools]
shellcheck = "0.9.0"
working_directory: app # [default: .] directory to run mise in
2023-02-21 23:34:44 -06:00
- run: shellcheck scripts/*.sh
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
2024-01-02 16:16:49 -06:00
- uses: jdx/mise-action@v1
2023-02-21 23:34:44 -06:00
# .tool-versions will be read from repo root
- run: node ./my_app.js
2023-01-14 08:11:40 -06:00
```
2023-12-07 17:44:02 -06:00
2024-01-02 16:16:49 -06:00
Alternatively, mise is easy to use in GitHub Actions even without this:
2023-12-07 17:44:02 -06:00
```yaml
jobs:
build:
steps:
2023-12-07 17:49:37 -06:00
- run: |
2024-01-02 16:16:49 -06:00
curl https://mise.jdx.dev/install.sh | sh
echo "$HOME/.local/share/mise/bin" >> $GITHUB_PATH
echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH
2023-12-07 17:44:02 -06:00
```