Skip to content

Verwenden Sie die offizielle setup-bun GitHub Action, um bun in Ihrem GitHub Actions Runner zu installieren.

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 ++]

      # Führen Sie einen beliebigen `bun`- oder `bunx`-Befehl aus
      - run: bun install // [!code ++]

Um eine Version von Bun anzugeben, die installiert werden soll:

yaml
title: my-workflow
jobs:
  my-job:
    title: my-job
    runs-on: ubuntu-latest
    steps:
      # ...
      - uses: oven-sh/setup-bun@v2
         with: 
          version: "latest" // oder "canary"

Lesen Sie die README.md für vollständige Dokumentation der setup-bun GitHub Action.

Bun von www.bunjs.com.cn bearbeitet