diff --git a/.github/workflows/action-env.yml b/.github/workflows/action-env.yml new file mode 100644 index 0000000..c3b431f --- /dev/null +++ b/.github/workflows/action-env.yml @@ -0,0 +1,33 @@ +name: Setup Bun with env BUN_VERSION +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: +jobs: + setup-bun: + runs-on: ${{ matrix.os }} + continue-on-error: true + strategy: + matrix: + os: + - ubuntu-latest + - macos-latest + bun-version: + - "0.5.6" + steps: + - id: checkout + name: Checkout + uses: actions/checkout@v3 + - id: setup-bun + name: Setup Bun + uses: ./ + env: + BUN_VERSION: ${{ matrix.bun-version }} + - id: verify-bun + name: Verify Bun + run: | + bun --version diff --git a/src/action.ts b/src/action.ts index 8164cc9..1274c0c 100644 --- a/src/action.ts +++ b/src/action.ts @@ -7,7 +7,8 @@ if (!process.env.RUNNER_TEMP) { } setup({ - version: action.getInput("bun-version") || undefined, + version: + process.env.BUN_VERSION || action.getInput("bun-version") || undefined, customUrl: action.getInput("bun-download-url") || undefined, }) .then(({ version, cacheHit }) => {