Skip to content

Commit

Permalink
sudo for installing hab pkg
Browse files Browse the repository at this point in the history
Signed-off-by: nitin sanghi <[email protected]>
  • Loading branch information
sanghinitin committed Dec 2, 2024
1 parent f015165 commit 2677bea
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/habitat-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ jobs:
export HAB_FALLBACK_CHANNEL="${{vars.HAB_FALLBACK_CHANNEL}}"
HABITAT_VERSION="${HABITAT_VERSION:?HABITAT_VERSION must be set}"
HABITAT_TARGET="${HABITAT_TARGET:-x86_64-linux}"
CHEF_LICENSE="accept-no-persist"
HAB_LICENSE="accept-no-persist"
curl https://raw.githubusercontent.com/habitat-sh/habitat/master/components/hab/install.sh | sudo bash -s -- -v "$HABITAT_VERSION" -t "$HABITAT_TARGET"
- name: run Habitat packaging (linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand All @@ -85,7 +83,12 @@ jobs:
echo "--- running linux hab build"
hab pkg build .
hartfile=$(ls ./results | grep "chef-cli" | 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
hab pkg list --all
chmod +x habitat/tests/test.sh
habitat/tests/test.sh "${{vars.PKG_IDENT}}"
Expand Down

0 comments on commit 2677bea

Please sign in to comment.