Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install bun in a containerized runner job. Install script from bun.sh works. #55

Open
mlitvinav opened this issue Feb 2, 2024 · 2 comments

Comments

@mlitvinav
Copy link

Today i discovered an issue with the setup-bun action. We use setup-bun to install the dependencies and then execute the app with node.
I also can see that setup-bun not containerized, which runs in the runner directly, does not have any issues.

How to reproduce

e2e:
    permissions:
      actions: read
      contents: read
      id-token: write
      pull-requests: write
      repository-projects: read
    services:
      mock_server:
        image: mockserver/mockserver
        env:
          IS_E2E: true
          MOCKSERVER_LOG_LEVEL: WARN
    container:
      image: mcr.microsoft.com/playwright:v1.40.0-jammy
    steps:
      - name: Fix possible git-lfs issues
        run: rm -rf .git/hooks/post-checkout
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: 20
      - uses: oven-sh/setup-bun@v1
        with:
          bun-version: latest

Logs

Run: actions/checkout@v3
/usr/bin/docker exec  b9f03e81ffcc8799fd9d96166dcc7960541b4625d2c2ea2caa4d88730c35ea0f sh -c "cat /etc/*release | grep ^ID"
Found in cache @ /__t/node/20.9.0/x64

Run: oven-sh/setup-bun@v1
/usr/bin/docker exec  b9f03e81ffcc8799fd9d96166dcc7960541b4625d2c2ea2caa4d88730c35ea0f sh -c "cat /etc/*release | grep ^ID"
OCI runtime exec failed: exec failed: container_linux.go:367: starting container process caused: exec: "/__e/node20/bin/node": stat /__e/node20/bin/node: no such file or directory: unknown

I believe the action looks for node in the wrong space when containerized.

How to fix?

Swap out the install action to the install script. See the lastest docs to see how to pin specific versions, if desired:

      - name: Setup Bun
        run: |
          curl -fsSL https://bun.sh/install | bash

Feel free to close this ticket if you cannot reproduce it. I am unsure if this is a big issue or not. It would be nice to use the setup-bun action everywhere but i am fine with the install script workaround.

@sharunkumar
Copy link

sharunkumar commented Sep 27, 2024

Swap out the install action to the install script. See the lastest docs to see how to pin specific versions, if desired:

      - name: Setup Bun
        run: |
          curl -fsSL https://bun.sh/install | bash

this workaround doesn't seem to be setting up bun globally, so subsequent run commands that use bun would fail

@alexgraul
Copy link

Can confirm we've hit the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants