Inject version when building and report version to Gitea via log and header (#43)
close #42 1. Inject runner version when `make build` After building, executing command line: `./act_runner -v` or `./act_runner --version`, the version of runner is printed.  2. In `Actions` UI:  3. Set request header in http client interceptor. Co-authored-by: sillyguodong <gedong_1994@163.com> Reviewed-on: https://gitea.com/gitea/act_runner/pulls/43 Reviewed-by: delvh <dev.lh@web.de> Reviewed-by: Jason Song <i@wolfogre.com> Co-authored-by: sillyguodong <sillyguodong@noreply.gitea.io> Co-committed-by: sillyguodong <sillyguodong@noreply.gitea.io>
This commit is contained in:
parent
ebcf341de7
commit
0d71463662
9 changed files with 24 additions and 13 deletions
|
@ -60,7 +60,7 @@ builds:
|
|||
flags:
|
||||
- -trimpath
|
||||
ldflags:
|
||||
- -s -w
|
||||
- -s -w -X gitea.com/gitea/act_runner/cmd.version={{ .Version }}
|
||||
binary: >-
|
||||
{{ .ProjectName }}-
|
||||
{{- if .IsSnapshot }}{{ .Branch }}-
|
||||
|
@ -93,4 +93,4 @@ snapshot:
|
|||
|
||||
nightly:
|
||||
publish_release: false
|
||||
name_template: "{{ .Branch }}"
|
||||
name_template: "{{ .Branch }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue