From 0abe50e8ad7f21e0a251c90075404beb37e27363 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Wed, 11 Dec 2024 08:33:00 -0500 Subject: [PATCH] github: add ~/go/bin to system PATH in actions/lp-snap-build Signed-off-by: Simon Deziel --- .github/actions/lp-snap-build/action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/actions/lp-snap-build/action.yml b/.github/actions/lp-snap-build/action.yml index 0a8b42a6f3f3..b3b7a8f866b7 100644 --- a/.github/actions/lp-snap-build/action.yml +++ b/.github/actions/lp-snap-build/action.yml @@ -56,3 +56,9 @@ runs: # Depends on Go being available which is the case in the GitHub Actions environment set -eux go install github.com/canonical/lxd-ci/lxd-snapcraft@latest + + # Update system PATH to add ~/go/bin if needed + echo "${PATH}" + if ! echo "${PATH}" | grep -F go/bin; then + echo "$(go env GOPATH)/bin" >> "${GITHUB_PATH}" + fi