Commit e9f53980 authored by Andres Anaya Amariels's avatar Andres Anaya Amariels 🚀
Browse files

fix: enhance Go installation check in CI template

parent 0d5f158d
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -24,11 +24,24 @@ dev_secrets_in_repo:
    - when: always
  script:
    - |
      # Install Go if not installed
      if ! command -v go >/dev/null 2>&1; then
        echo "Installing Go..."
        sudo apt-get update -y
        sudo apt-get install -y golang-go git
      else
        echo "Go already installed: $(go version)"
      fi

      if ! command -v trufflehog >/dev/null 2>&1; then
        echo "Installing trufflehog from source..."
        git clone https://github.com/trufflesecurity/trufflehog.git
        cd trufflehog
        go install
        
        # Ensure Go bin path is available
        export PATH=$PATH:$(go env GOPATH)/bin
        
        echo "trufflehog installed successfully: $(trufflehog --version)"
      else
        echo "trufflehog already installed: $(trufflehog --version)"