1
1
name : Tag and Push
2
2
3
3
on :
4
- release :
5
- types : [created]
4
+ push :
5
+ tags :
6
+ - " v*.*.*"
6
7
workflow_dispatch :
7
8
inputs :
8
9
version :
@@ -18,48 +19,71 @@ jobs:
18
19
contents : read
19
20
packages : write
20
21
steps :
21
- - name : ' Checkout GitHub Action'
22
- uses : actions/checkout@main
22
+ - name : ' Checkout GitHub Action'
23
+ uses : actions/checkout@main
23
24
24
- - name : Login to GitHub Container Registry
25
- uses : docker/login-action@v3
26
- with :
27
- registry : ghcr.io
28
- username : ${{ github.actor }}
29
- password : ${{ secrets.GITHUB_TOKEN }}
25
+ - name : Login to GitHub Container Registry
26
+ uses : docker/login-action@v3
27
+ with :
28
+ registry : ghcr.io
29
+ username : ${{ github.actor }}
30
+ password : ${{ secrets.GITHUB_TOKEN }}
30
31
31
- - name : ' Build Images'
32
- run : |
33
- # if workflow_dispatch is used, use the version input
34
- if [ -n "${{ github.event.inputs.version }}" ]; then
35
- export VERSION=${{ github.event.inputs.version }}
36
- else
37
- export VERSION=$(echo "$GITHUB_REF" | cut -c8-)
38
- fi
39
- make build
40
- make push
32
+ - name : ' Build Images'
33
+ run : |
34
+ # if workflow_dispatch is used, use the version input
35
+ if [ -n "${{ github.event.inputs.version }}" ]; then
36
+ export VERSION=${{ github.event.inputs.version }}
37
+ else
38
+ export VERSION=$(echo "$GITHUB_REF" | cut -c8-)
39
+ fi
40
+ make build
41
+ make push
41
42
push-helm-chart :
42
43
runs-on : ubuntu-latest
43
44
permissions :
44
45
contents : read
45
46
packages : write
46
47
steps :
47
- - name : ' Checkout GitHub Action'
48
- uses : actions/checkout@main
48
+ - name : ' Checkout GitHub Action'
49
+ uses : actions/checkout@main
49
50
50
- - name : Login to GitHub Container Registry
51
- uses : docker/login-action@v3
52
- with :
53
- registry : ghcr.io
54
- username : ${{ github.actor }}
55
- password : ${{ secrets.GITHUB_TOKEN }}
51
+ - name : Login to GitHub Container Registry
52
+ uses : docker/login-action@v3
53
+ with :
54
+ registry : ghcr.io
55
+ username : ${{ github.actor }}
56
+ password : ${{ secrets.GITHUB_TOKEN }}
56
57
57
- - name : ' Build Image'
58
- run : |
59
- # if workflow_dispatch is used, use the version input
60
- if [ -n "${{ github.event.inputs.version }}" ]; then
61
- export VERSION=${{ github.event.inputs.version }}
62
- else
63
- export VERSION=$(echo "$GITHUB_REF" | cut -c8-)
64
- fi
65
- make helm-publish
58
+ - name : ' Build Image'
59
+ run : |
60
+ # if workflow_dispatch is used, use the version input
61
+ if [ -n "${{ github.event.inputs.version }}" ]; then
62
+ export VERSION=${{ github.event.inputs.version }}
63
+ else
64
+ export VERSION=$(echo "$GITHUB_REF" | cut -c8-)
65
+ fi
66
+ make helm-publish
67
+ release :
68
+ runs-on : ubuntu-latest
69
+ permissions :
70
+ contents : write
71
+ steps :
72
+ - name : Checkout
73
+ uses : actions/checkout@v4
74
+ - name : Build
75
+ run : |
76
+ # if workflow_dispatch is used, use the version input
77
+ if [ -n "${{ github.event.inputs.version }}" ]; then
78
+ export VERSION=${{ github.event.inputs.version }}
79
+ else
80
+ export VERSION=$(echo "$GITHUB_REF" | cut -c8-)
81
+ fi
82
+ make build-cli
83
+ - name : Release
84
+ uses : softprops/action-gh-release@v2
85
+ if : startsWith(github.ref, 'refs/tags/')
86
+ with :
87
+ files : |
88
+ go/bin/kagent-*
89
+ helm/kagent-*.tgz
0 commit comments