Skip to content
NewBun 1.4.5 is out. Release notes
AphrodyBun

Guides · Package Manager

Install dependencies with Bun in GitHub Actions

Install Bun and project dependencies in a GitHub Actions workflow.

Use the setup-bun action of aphrody-labs/bun to install bun in your GitHub Actions runner. It installs a release of aphrody-labs/bun and checks it against the release's SHA256SUMS.txt.

workflow.yml
name: my-workflow
jobs:
  my-job:
    name: my-job
    runs-on: ubuntu-latest
    steps:
      # ...
      - uses: actions/checkout@v4
      - uses: aphrody-labs/bun/.github/actions/setup-bun@main # [!code ++]

      # run any `bun` or `bunx` command
      - run: bun install # [!code ++]

To specify a version of Bun to install:

workflow.yml
name: my-workflow
jobs:
  my-job:
    name: my-job
    runs-on: ubuntu-latest
    steps:
      # ...
      - uses: aphrody-labs/bun/.github/actions/setup-bun@main
        with: # [!code ++]
          bun-version: "latest" # or "1.4.5", or a tag such as "bun-v1.4.5" # [!code ++]

See the setup-bun action.