setup bun with env BUN_VERSION

This commit is contained in:
Patrick Wozniak 2023-06-03 06:06:50 +02:00
parent 4573031972
commit 3240db0534
No known key found for this signature in database
GPG key ID: A91D256891D33D14
2 changed files with 35 additions and 1 deletions

33
.github/workflows/action-env.yml vendored Normal file
View file

@ -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

View file

@ -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 }) => {