6
6
- master
7
7
- dev
8
8
tags :
9
- - ' *'
9
+ - ' *'
10
10
pull_request :
11
11
branches :
12
12
- master
20
20
- unlocked
21
21
- review_requested
22
22
workflow_dispatch :
23
-
23
+
24
24
env :
25
25
DOCKER_REGISTRY_REPOSITORY : sysflowtelemetry/sf-processor
26
26
PLUGIN_BUILDER_DOCKER_REGISTRY_REPOSITORY : sysflowtelemetry/plugin-builder
@@ -34,47 +34,47 @@ jobs:
34
34
uses : actions/checkout@v2
35
35
- name : Lint core module
36
36
uses : golangci/golangci-lint-action@v2
37
- with :
38
- version : v1.42.1
37
+ with :
38
+ version : v1.46.1
39
39
working-directory : core
40
- args : --disable=errcheck
41
- lint-driver :
40
+ args : --disable=errcheck
41
+ lint-driver :
42
42
needs : lint-core
43
43
runs-on : ubuntu-latest
44
44
steps :
45
45
- name : Checkout
46
- uses : actions/checkout@v2
46
+ uses : actions/checkout@v2
47
47
- name : Lint driver module
48
48
uses : golangci/golangci-lint-action@v2
49
- with :
50
- version : v1.42.1
49
+ with :
50
+ version : v1.46.1
51
51
working-directory : driver
52
- args : --disable=errcheck
52
+ args : --disable=errcheck
53
53
docker :
54
54
needs : lint-driver
55
55
runs-on : ubuntu-latest
56
56
permissions :
57
57
contents : read
58
58
packages : write
59
- steps :
59
+ steps :
60
60
- name : Checkout
61
- uses : actions/checkout@v2
62
- - name : Read manifest
63
- shell : bash
64
- run : |
65
- echo "UBI_VERSION=$(awk -F'=' '/UBI_VERSION/{print $2}' makefile.manifest.inc)" >> $GITHUB_ENV
61
+ uses : actions/checkout@v2
62
+ - name : Read manifest
63
+ shell : bash
64
+ run : |
65
+ echo "UBI_VERSION=$(awk -F'=' '/UBI_VERSION/{print $2}' makefile.manifest.inc)" >> $GITHUB_ENV
66
66
- name : Docker meta
67
67
id : meta
68
68
uses : docker/metadata-action@v3
69
- with :
69
+ with :
70
70
images : |
71
71
${{ env.DOCKER_REGISTRY_REPOSITORY }}
72
72
ghcr.io/${{ github.repository }}
73
- tags : |
73
+ tags : |
74
74
type=edge,branch=master
75
75
type=ref,event=branch
76
- type=ref,event=tag
77
- type=ref,event=pr
76
+ type=ref,event=tag
77
+ type=ref,event=pr
78
78
labels : |
79
79
org.opencontainers.image.documentation=https://sysflow.readthedocs.io/
80
80
org.opencontainers.image.vendor=SysFlow
@@ -83,49 +83,49 @@ jobs:
83
83
- name : Set up Docker Buildx
84
84
uses : docker/setup-buildx-action@v1
85
85
- name : Login to DockerHub
86
- uses : docker/login-action@v1
86
+ uses : docker/login-action@v1
87
87
if : ${{ github.event_name != 'pull_request' }}
88
88
with :
89
89
username : ${{ secrets.DOCKERHUB_USERNAME }}
90
90
password : ${{ secrets.DOCKERHUB_TOKEN }}
91
91
- name : Login to GitHub Container Registry
92
- uses : docker/login-action@v1
92
+ uses : docker/login-action@v1
93
93
if : ${{ github.event_name != 'pull_request' }}
94
94
with :
95
95
registry : ghcr.io
96
96
username : ${{ github.repository_owner }}
97
- password : ${{ secrets.GITHUB_TOKEN }}
97
+ password : ${{ secrets.GITHUB_TOKEN }}
98
98
- name : Set build args
99
99
id : args
100
100
shell : bash
101
101
run : |
102
102
echo "##[set-output name=ubi_version;]$(awk -F'=' '/UBI_VERSION/{print $2}' makefile.manifest.inc)"
103
103
echo "##[set-output name=branch;]$(echo ${GITHUB_REF##refs/*/})"
104
- echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
104
+ echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
105
105
- name : Build and push plugin builder image
106
- id : docker_plugin_builder
107
- uses : docker/build-push-action@v2
106
+ id : docker_plugin_builder
107
+ uses : docker/build-push-action@v2
108
108
with :
109
109
push : ${{ github.event_name != 'pull_request' }}
110
110
tags : |
111
111
${{ env.PLUGIN_BUILDER_DOCKER_REGISTRY_REPOSITORY }}:${{ steps.args.outputs.branch }}
112
- ghcr.io/${{ env.GH_ORGANIZATION }}/plugin-builder:${{ steps.args.outputs.branch }}
113
- target : base
112
+ ghcr.io/${{ env.GH_ORGANIZATION }}/plugin-builder:${{ steps.args.outputs.branch }}
113
+ target : base
114
114
labels : " ${{ steps.meta.outputs.labels }}"
115
- build-args : |
115
+ build-args : |
116
116
BUILD_NUMBER=${{ steps.args.outputs.sha_short }}
117
117
VERSION=${{ steps.args.outputs.branch }}
118
118
RELEASE=${{ steps.args.outputs.sha_short }}
119
- UBI_VER=${{ steps.args.outputs.ubi_version }}
119
+ UBI_VER=${{ steps.args.outputs.ubi_version }}
120
120
- name : Build and push
121
- id : docker_build
122
- uses : docker/build-push-action@v2
121
+ id : docker_build
122
+ uses : docker/build-push-action@v2
123
123
with :
124
124
push : ${{ github.event_name != 'pull_request' }}
125
125
tags : " ${{ steps.meta.outputs.tags }}"
126
126
labels : " ${{ steps.meta.outputs.labels }}"
127
127
cache-from : type=registry,ref=ghcr.io/${{ env.GH_ORGANIZATION }}/plugin-builder:${{ steps.args.outputs.branch }}
128
- build-args : |
128
+ build-args : |
129
129
BUILD_NUMBER=${{ steps.args.outputs.sha_short }}
130
130
VERSION=${{ steps.args.outputs.branch }}
131
131
RELEASE=${{ steps.args.outputs.sha_short }}
@@ -138,55 +138,54 @@ jobs:
138
138
DOCKER_PASS : ${{ secrets.DOCKERHUB_TOKEN }}
139
139
with :
140
140
destination_container_repo : ${{ env.DOCKER_REGISTRY_REPOSITORY }}
141
- provider : dockerhub
142
- readme_file : " README.md"
141
+ provider : dockerhub
142
+ readme_file : " README.md"
143
143
- name : Image digest
144
144
run : echo ${{ steps.docker_build.outputs.digest }}
145
- release :
146
- needs : docker
145
+ release :
146
+ needs : docker
147
147
if : startsWith(github.ref, 'refs/tags/')
148
- runs-on : ubuntu-latest
148
+ runs-on : ubuntu-latest
149
149
permissions :
150
- contents : write
151
- steps :
150
+ contents : write
151
+ steps :
152
152
- name : Checkout
153
- uses : actions/checkout@v2
153
+ uses : actions/checkout@v2
154
154
- name : Set up Docker Buildx
155
- uses : docker/setup-buildx-action@v1
155
+ uses : docker/setup-buildx-action@v1
156
156
- name : Setup cmake
157
157
158
158
with :
159
- cmake-version : ' 3.16.x'
159
+ cmake-version : ' 3.16.x'
160
160
- name : Get version from tag
161
161
id : tag_name
162
162
shell : bash
163
- run : |
164
- GHREF=${GITHUB_REF#refs/tags/}; echo ::set-output name=current_version::${GHREF%-*}
165
- echo ::set-output name=current_tag::${GITHUB_REF#refs/tags/}
163
+ run : |
164
+ GHREF=${GITHUB_REF#refs/tags/}; echo ::set-output name=current_version::${GHREF%-*}
165
+ echo ::set-output name=current_tag::${GITHUB_REF#refs/tags/}
166
166
- name : Build Release Assets
167
167
id : build_release_assets
168
168
shell : bash
169
169
run : |
170
170
docker pull ${{ env.DOCKER_REGISTRY_REPOSITORY }}:${{ steps.tag_name.outputs.current_tag }}
171
171
make package
172
- echo "##[set-output name=deb;] $(ls ${{ github.workspace }}/scripts/cpack/*.deb)"
173
- echo "##[set-output name=rpm;] $(ls ${{ github.workspace }}/scripts/cpack/*.rpm)"
174
- echo "##[set-output name=targz;] $(ls ${{ github.workspace }}/scripts/cpack/*.tar.gz)"
172
+ echo "##[set-output name=deb;] $(ls ${{ github.workspace }}/scripts/cpack/*.deb)"
173
+ echo "##[set-output name=rpm;] $(ls ${{ github.workspace }}/scripts/cpack/*.rpm)"
174
+ echo "##[set-output name=targz;] $(ls ${{ github.workspace }}/scripts/cpack/*.tar.gz)"
175
175
- name : Get Changelog Entry
176
176
id : changelog_reader
177
177
uses : mindsers/changelog-reader-action@v2
178
- with :
178
+ with :
179
179
version : ${{ steps.tag_name.outputs.current_version }}
180
- path : ./CHANGELOG.md
180
+ path : ./CHANGELOG.md
181
181
- name : Release
182
- uses : softprops/action-gh-release@v1
182
+ uses : softprops/action-gh-release@v1
183
183
with :
184
- body : ${{ steps.changelog_reader.outputs.changes }}
185
- token : ${{ secrets.GITHUB_TOKEN }}
184
+ body : ${{ steps.changelog_reader.outputs.changes }}
185
+ token : ${{ secrets.GITHUB_TOKEN }}
186
186
prerelease : contains(steps.tag_name.outputs.current_version, '-rc')
187
187
draft : true
188
188
files : |
189
189
${{ steps.build_release_assets.outputs.deb }}
190
190
${{ steps.build_release_assets.outputs.rpm }}
191
191
${{ steps.build_release_assets.outputs.targz }}
192
-
0 commit comments