Inject version when building and report version to Gitea via log and header #43

Merged
wolfogre merged 4 commits from sillyguodong/act_runner:feature/issue_42 into main 2023-03-13 10:57:35 +00:00
Member

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.
    image

  2. In Actions UI:
    image

  3. Set request header in http client interceptor.

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. ![image](/attachments/e25efbd3-79b3-49a5-b93f-42646d42c707) 2. In `Actions` UI: ![image](/attachments/36c57470-2a1d-4796-9eb0-de3988ab88e1) 3. Set request header in http client interceptor.
sillyguodong added 2 commits 2023-03-10 06:11:47 +00:00
techknowlogick requested changes 2023-03-10 06:17:47 +00:00
Dismissed
techknowlogick left a comment
Owner

Can you add ldflag to goreleaser config too?

Can you add ldflag to goreleaser config too?
sillyguodong added 1 commit 2023-03-10 06:47:51 +00:00
techknowlogick dismissed techknowlogick’s review 2023-03-10 06:48:40 +00:00
Reason:

thanks :)

techknowlogick reviewed 2023-03-10 06:58:53 +00:00
cmd/cmd.go Outdated
@ -12,6 +13,8 @@ import (
const version = "0.1.5"

What is this version used for?

What is this `version` used for?
delvh approved these changes 2023-03-10 09:54:00 +00:00
delvh left a comment
Owner

Apart from @techknowlogick's comment LGTM.

Apart from @techknowlogick's comment LGTM.
sillyguodong reviewed 2023-03-10 10:25:14 +00:00
cmd/cmd.go Outdated
@ -12,6 +13,8 @@ import (
const version = "0.1.5"
Author
Member

From the output of executing ./act_runner, it seems like version for act. I am not sure this version is useful, so I declare a new variable RunnerVersion. If this version is useless, i will use this to save the version of act_runner.

From the output of executing `./act_runner`, it seems like `version for act`. I am not sure this `version` is useful, so I declare a new variable `RunnerVersion`. If this `version` is useless, i will use this to save the version of `act_runner`.
wolfogre reviewed 2023-03-13 07:30:56 +00:00
cmd/cmd.go Outdated
@ -12,6 +13,8 @@ import (
const version = "0.1.5"
Owner

I'm pretty sure it's useless.

I'm pretty sure it's useless.
sillyguodong added 1 commit 2023-03-13 08:17:50 +00:00
sillyguodong changed title from WIP: Inject version when building and report version to Gitea via log and header to Inject version when building and report version to Gitea via log and header 2023-03-13 08:19:05 +00:00
wolfogre approved these changes 2023-03-13 10:56:41 +00:00
wolfogre merged commit 0d71463662 into main 2023-03-13 10:57:35 +00:00
Sign in to join this conversation.
No description provided.