File tree Expand file tree Collapse file tree 1 file changed +74
-0
lines changed
Expand file tree Collapse file tree 1 file changed +74
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Validate CLI Security Compatibility"
2+
3+ on :
4+ push :
5+ branches :
6+ - " master"
7+ tags-ignore :
8+ - " **"
9+ pull_request_target :
10+ types : [opened, synchronize]
11+ branches :
12+ - " master"
13+ workflow_dispatch :
14+ inputs :
15+ cli_security_branch :
16+ description : ' CLI Security branch to test against'
17+ required : false
18+ default : ' main'
19+ type : choice
20+ options :
21+ - main
22+ - dev
23+
24+ permissions :
25+ contents : read
26+ pull-requests : read
27+
28+ jobs :
29+ validate-cli-security :
30+ name : Validate CLI Security Compatibility
31+ runs-on : ubuntu-latest
32+ steps :
33+ - name : Checkout CLI Core
34+ uses : actions/checkout@v5
35+ with :
36+ ref : ${{ github.event.pull_request.head.sha || github.ref }}
37+
38+ - name : Checkout CLI Security
39+ uses : actions/checkout@v5
40+ with :
41+ repository : jfrog/jfrog-cli-security
42+ ref : ${{ github.event.inputs.cli_security_branch || 'main' }}
43+ path : cli-security
44+
45+ - name : Setup Go with cache
46+ uses : jfrog/.github/actions/install-go-with-cache@main
47+
48+ - name : Get CLI Core absolute path
49+ id : cli_core_path
50+ run : |
51+ CLI_CORE_PATH=$(pwd)
52+ echo "cli_core_path=$CLI_CORE_PATH" >> $GITHUB_OUTPUT
53+ echo "CLI Core path: $CLI_CORE_PATH"
54+
55+ - name : Modify CLI Security go.mod
56+ run : |
57+ cd cli-security
58+
59+ # Add replace directive to use local CLI Core
60+ echo "" >> go.mod
61+ echo "replace github.com/jfrog/jfrog-cli-core/v2 => ${{ steps.cli_core_path.outputs.cli_core_path }}" >> go.mod
62+
63+ # Run go mod tidy to clean up dependencies
64+ go mod tidy
65+
66+ echo "Modified go.mod with replace directive:"
67+ tail -5 go.mod
68+
69+ - name : Run go vet on CLI Security
70+ run : |
71+ cd cli-security
72+ echo "Running go vet on CLI Security..."
73+ go vet ./...
74+ echo "✅ go vet completed successfully - no issues found"
You can’t perform that action at this time.
0 commit comments