From 66bf18b34d18301673547e707a1f473f8611ecec Mon Sep 17 00:00:00 2001 From: Sachin Date: Tue, 3 Dec 2024 15:56:55 +0530 Subject: [PATCH] add version check in hab environment Signed-off-by: Sachin --- .github/workflows/habitat-build.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/habitat-build.yml b/.github/workflows/habitat-build.yml index 7c37c420b..70aaa750a 100644 --- a/.github/workflows/habitat-build.yml +++ b/.github/workflows/habitat-build.yml @@ -82,6 +82,16 @@ jobs: hab origin key download --auth $HAB_AUTH_TOKEN --secret $HAB_ORIGIN echo "--- running linux hab build" hab pkg build . + hartfile=$(ls ./results | grep "berkshelf" | tail -n 1) + sudo hab license accept + export CHEF_LICENSE="accept-no-persist" + export HAB_LICENSE="accept-no-persist" + export HAB_NONINTERACTIVE="true" + sudo hab pkg install ./results/$hartfile + . ./results/last_build.env + export pkg_ident + chmod +x habitat/tests/test.sh + habitat/tests/test.sh - name: Install Habitat on Windows if: ${{ matrix.os == 'windows-latest' }} shell: pwsh @@ -99,4 +109,8 @@ jobs: hab origin key download ${{ env.HAB_ORIGIN }} hab origin key download --auth ${{ secrets.HAB_AUTH_TOKEN }} --secret ${{ env.HAB_ORIGIN }} write-output "--- running windows hab build" - hab pkg build . \ No newline at end of file + hab pkg build . + $hartfile=(ls ./results -Name | findstr "berkshelf") + hab pkg install ./results/$hartfile + . ./results/last_build.ps1 + habitat/tests/test.ps1 $pkg_ident \ No newline at end of file