Skip to content

Commit 23e461d

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

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed
Lines changed: 10 additions & 2 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: |
2937
make 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: 13 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+
files: ./cmd/cli/docker-bake.hcl
3441
target: validate
3542

3643
validate:
@@ -42,6 +49,9 @@ jobs:
4249
matrix:
4350
target: ${{ fromJson(needs.prepare.outputs.targets) }}
4451
steps:
52+
-
53+
name: Checkout
54+
uses: actions/checkout@v4
4555
-
4656
name: Set up Docker Buildx
4757
uses: docker/setup-buildx-action@v3
@@ -51,4 +61,6 @@ jobs:
5161
name: Validate
5262
uses: docker/bake-action@v6
5363
with:
64+
files: ./cmd/cli/docker-bake.hcl
65+
source: cmd/cli
5466
targets: ${{ matrix.target }}

0 commit comments

Comments
 (0)