Skip to content

Commit

Permalink
Stack version pull to env
Browse files Browse the repository at this point in the history
  • Loading branch information
jeniawhite committed Oct 29, 2024
1 parent fae4bca commit 8ddb29f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ jobs:

- name: Check Asset Inventory supported version
id: check-asset-inventory-supported-version
env:
STACK_VERSION: ${{ env.ELK_VERSION }}
run: |
MIN_VERSION="8.16.0"
if [[ "$(echo -e "$MIN_VERSION\n${{ env.ELK_VERSION }}" | sort -V | head -n 1)" == "$MIN_VERSION" ]]; then
echo "Stack version meets the requirement: ${{ env.ELK_VERSION }} >= $MIN_VERSION."
if [[ "$(echo -e "$MIN_VERSION\n$STACK_VERSION" | sort -V | head -n 1)" == "$MIN_VERSION" ]]; then
echo "Stack version meets the requirement: $STACK_VERSION >= $MIN_VERSION."
echo "asset_inventory_supported=true" >> $GITHUB_ENV
else
echo "Stack version is below the requirement: ${{ env.ELK_VERSION }} < $MIN_VERSION."
echo "Stack version is below the requirement: $STACK_VERSION < $MIN_VERSION."
echo "asset_inventory_supported=false" >> $GITHUB_ENV
fi
Expand Down

0 comments on commit 8ddb29f

Please sign in to comment.