mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
Fix CodeQL checks for Go (#456)
* Fix CodeQL checks for Go * add scripthaus checkout * fix * fix * add scripthaus to path * test go setup before init
This commit is contained in:
parent
8ac7d8c241
commit
fd05e11d3a
33
.github/workflows/codeql.yml
vendored
33
.github/workflows/codeql.yml
vendored
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user