Skip to content

Commit e95bf31

Browse files
committed
cli: keep github workflows
Signed-off-by: Dorin Geman <[email protected]>
1 parent a39f8ce commit e95bf31

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@ name: Build model-cli
33
on:
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
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: validate
1+
name: Validate model-cli
22

33
permissions:
44
contents: read
@@ -15,7 +15,13 @@ on:
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

2026
jobs:
2127
prepare:
@@ -31,6 +37,7 @@ jobs:
3137
id: generate
3238
uses: docker/bake-action/subaction/list-targets@v6
3339
with:
40+
workdir: cmd/cli
3441
target: validate
3542

3643
validate:
@@ -51,4 +58,5 @@ jobs:
5158
name: Validate
5259
uses: docker/bake-action@v6
5360
with:
61+
workdir: cmd/cli
5462
targets: ${{ matrix.target }}

0 commit comments

Comments
 (0)