ci: more readable version

This commit is contained in:
Jozef Steinhübl 2024-05-08 10:54:04 +02:00
parent 6c61d0abb9
commit 83142f73b0
No known key found for this signature in database
GPG key ID: E6BC90C91973B08F
2 changed files with 59 additions and 103 deletions

View 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