mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #1069] Enhancement: --version and --bugreport should report tag or commit hash for compiled Act instances #620
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#620
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @maxsu on GitHub (Mar 23, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1069
Enhancement
When act is built from scratch or installed with
go install, it would be helpful for the--versionand--bug-reportflags to report the tag and/or commit hash (and indicate act was compiled).Existing Behavior
--bug-reportleaves the version field empty, and the--versionflag is not compiled:This leaves some room for surprise, and requires an workaround (see below).
System information
Act version: 0.2.26
Install route:
go install github.com/nektos/act@latestOS: Pop_OS 21.10
Arch: x86-64
Workaround
I can find the tag like so:
@maxsu commented on GitHub (Mar 23, 2022):
Is the existing behavior designed to encourage people to file bug reports against official versions?
In that case, consider the requested feature makes it easier to comply with the issue template requirement:
There are good and bad sides to this:
@catthehacker commented on GitHub (Mar 23, 2022):
It already provides version, but you have to supply it via ldflags
@maxsu commented on GitHub (Mar 23, 2022):
@catthehacker thanks for the lead!
I can now set Act to a very special version:
The project has two ways of auto-setting the version:
Manual builds via Makefile:
Makefilelines 2 and 26 set the version as described in this article. If the user is not at a tag, the logic in line 2 gives us a commit hash.Github action:
.github/actions/release.ymlrunsgoreleaser/goreleaser-action@v1. That takes the argumentversion: latestand just does the right thing (goreleaser/github.ts:L25-L27)@maxsu commented on GitHub (Mar 23, 2022):
@catthehacker I propose that
go installshould also set the correct version.go installis one of the documented install methods, so without this, less experienced users (like yours truly) end up with non-versioned installs.@catthehacker commented on GitHub (Mar 24, 2022):
The expectation is that people who have Go will know why and how to version it, but I guess if someone knows Go they also know about
go installso I'll remove that instruction.@maxsu commented on GitHub (Apr 20, 2022):
I thought about this, and realize I was projecting expectations set by boyter's scc project:
scchardcodes the version in their CLI entrypointsccincrements the version through manual version bump commitssccpromotesgo installas its first deployment option.You have implemented points 1 and 2 in PR #1070. Thank you!
You have also deprecated go install, in wiki ad675d and #1123.
I will admit first class
go installhas a special place in my heart as a promoter of go - Boyter's project is the reason I learned how to install go, and so I consider it an evangelist for go.But that alone does not mean my expectation is right. To your points:
go installcan introduce support overheadactmeets a much more complex need thanscc, so its users are more likely to knowgo install.Therefore I am satisfied with your resolution. Thank you!
pkg/runner/act/where actions cache is stored #1525