File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed
Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,14 @@ name: Build model-cli
33on :
44 push :
55 branches : [ "main" ]
6+ paths :
7+ - ' cmd/cli/**'
8+ - ' .github/workflows/cli-build.yml'
69 pull_request :
710 branches : [ "main" ]
11+ paths :
12+ - ' cmd/cli/**'
13+ - ' .github/workflows/cli-build.yml'
814 workflow_dispatch :
915 inputs :
1016 branch :
@@ -22,15 +28,17 @@ jobs:
2228 - uses : actions/checkout@v4
2329 - uses : actions/setup-go@v5
2430 with :
25- go-version-file : go.mod
31+ go-version-file : cmd/cli/ go.mod
2632 cache : true
33+ cache-dependency-path : cmd/cli/go.sum
2734 - name : Build model-cli
35+ working-directory : cmd/cli
2836 run : |
29- make release VERSION=${{ github.sha }}
37+ make -C cmd/cli release VERSION=${{ github.sha }}
3038 - uses : actions/upload-artifact@v4
3139 with :
3240 name : dist
3341 path : |
34- dist/
42+ cmd/cli/ dist/
3543 retention-days : 2
3644 if-no-files-found : error
Original file line number Diff line number Diff line change 1- name : validate
1+ name : Validate model-cli
22
33permissions :
44 contents : read
1515 - ' v[0-9]*'
1616 tags :
1717 - ' v*'
18+ paths :
19+ - ' cmd/cli/**'
20+ - ' .github/workflows/cli-validate.yml'
1821 pull_request :
22+ paths :
23+ - ' cmd/cli/**'
24+ - ' .github/workflows/cli-validate.yml'
1925
2026jobs :
2127 prepare :
3137 id : generate
3238 uses : docker/bake-action/subaction/list-targets@v6
3339 with :
40+ workdir : cmd/cli
3441 target : validate
3542
3643 validate :
5158 name : Validate
5259 uses : docker/bake-action@v6
5360 with :
61+ workdir : cmd/cli
5462 targets : ${{ matrix.target }}
You can’t perform that action at this time.
0 commit comments