mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-20 05:28:25 +02:00
ci: more readable version
This commit is contained in:
parent
6c61d0abb9
commit
83142f73b0
2 changed files with 59 additions and 103 deletions
28
.github/actions/compare-bun-version/action.yml
vendored
Normal file
28
.github/actions/compare-bun-version/action.yml
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
name: Compare Bun Version
|
||||
description: Compare the version of Bun to a specified version
|
||||
|
||||
inputs:
|
||||
bun-version:
|
||||
description: "The version of Bun to compare against"
|
||||
required: true
|
||||
default: "1.1.0"
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Get installed Bun version
|
||||
id: bun
|
||||
shell: bash
|
||||
run: |
|
||||
bun --version
|
||||
echo "version=$(bun --version)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Compare versions
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ steps.bun.outputs.version }}" == "${{ inputs.bun-version }}" ]]; then
|
||||
echo "Version is ${{ inputs.bun-version }}"
|
||||
else
|
||||
echo "Expected version to be ${{ inputs.bun-version }}, got ${{ steps.bun.outputs.version }}"
|
||||
exit 1
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue