Usa la GitHub Action ufficiale setup-bun per installare bun nel tuo runner GitHub Actions.
yaml
title: my-workflow
jobs:
my-job:
title: my-job
runs-on: ubuntu-latest
steps:
# ...
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2 // [!code ++]
# esegui qualsiasi comando 'bun' o 'bunx'
- run: bun install // [!code ++]Per specificare una versione di Bun da installare:
yaml
title: my-workflow
jobs:
my-job:
title: my-job
runs-on: ubuntu-latest
steps:
# ...
- uses: oven-sh/setup-bun@v2
with:
version: "latest" # o "canary" Fai riferimento al README.md per la documentazione completa della GitHub Action setup-bun.