diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 456593c51..07ae2985b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -47,6 +47,32 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Checkout Scripthaus (Go only) + if: matrix.language == 'go' + uses: actions/checkout@v4 + with: + repository: scripthaus-dev/scripthaus + path: scripthaus + + - name: Setup Go (Go only) + uses: actions/setup-go@v5 + if: matrix.language == 'go' + with: + go-version: stable + cache-dependency-path: | + wavesrv/go.sum + waveshell/go.sum + scripthaus/go.sum + + - name: Install Scripthaus (Go only) + if: matrix.language == 'go' + run: | + go work use ./scripthaus; + cd scripthaus; + go get ./...; + CGO_ENABLED=1 go build -o scripthaus cmd/main.go + echo $PWD >> $GITHUB_PATH + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 @@ -61,9 +87,14 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild + - name: Autobuild (not Go) + if: matrix.language != 'go' uses: github/codeql-action/autobuild@v3 + - name: Build (Go only) + if: matrix.language == 'go' + run: scripthaus run build-backend + # ℹī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun