@@ -17,25 +17,25 @@ jobs:
1717 steps :
1818 - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1919 with :
20- ref : ${{ github.event.pull_request.head.sha }}
20+ ref : ${{ github.event.pull_request.merge_commit_sha }}
21+ path : 2ms
2122
2223 - uses : actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
2324 with :
2425 go-version : " ^1.22"
2526
26- - uses : actions/checkout@v4
27- with :
28- repository : Checkmarx-CxSast/2ms-internal
29- path : 2ms
30-
3127 - name : Build 2ms Binary
28+ env :
29+ CGO_ENABLED : 0
30+ GOOS : linux
31+ GOARCH : amd64
3232 run : |
3333 cd $GITHUB_WORKSPACE/2ms
34- go build -o $GITHUB_WORKSPACE/2ms/dist/2ms main.go
34+ go build -ldflags "-s -w" -a -installsuffix cgo - o $GITHUB_WORKSPACE/2ms/dist/2ms main.go
3535 chmod +x $GITHUB_WORKSPACE/2ms/dist/2ms
3636
3737 - name : Checkout CLI repo
38- uses : actions/checkout@v3
38+ uses : actions/checkout@v4
3939 with :
4040 repository : ${{ vars.CES_EXECUTOR_REPO }}
4141 token : ${{ secrets.TWOMS_BOT_PAT }}
5151 run : |
5252 mkdir -p "$GITHUB_WORKSPACE/zips/"
5353 cd cli
54- ./excutor sources -s $GITHUB_WORKSPACE/zips/ -e 2ms
54+ ./excutor sources -s $GITHUB_WORKSPACE/zips/ -e $ENGINE
5555 cd "$GITHUB_WORKSPACE/zips/"
5656 for zip in *.zip; do
5757 [ -e "$zip" ] || continue
6666
6767 - name : Create Metadata File
6868 run : |
69- COMMIT_TIMESTAMP=$(git log -1 --format=%ct)
69+ COMMIT_TIMESTAMP=$(git -C "$GITHUB_WORKSPACE/2ms" log -1 --format=%ct)
7070 METADATA_PATH="$GITHUB_WORKSPACE/pr-metadata.json"
7171 echo '{
7272 "seq": "'"${COMMIT_TIMESTAMP}"'",
0 commit comments