You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the act command for the first time via the GitHub CLI extension (gh act), users are informed with the message:
Default image and other options can be changed manually in ~/.actrc (please refer to https://github.com/nektos/act#configuration for additional information about file structure).
This message suggests that the configuration file (~/.actrc) is the primary (or only) place to modify the default settings. However, the underlying code supports multiple locations for the configuration file, as outlined by the configLocations function in root.go:
// Return locations where Act's config can be found in order: XDG spec, .actrc in HOME directory, .actrc in invocation directoryfuncconfigLocations() []string {
configFileName:=".actrc"homePath:=filepath.Join(UserHomeDir, configFileName)
invocationPath:=filepath.Join(".", configFileName)
// Though named xdg, adrg's lib support macOS and Windows config paths as well// It also takes cares of creating the parent folder so we don't need to bother laterspecPath, err:=xdg.ConfigFile("act/actrc")
iferr!=nil {
specPath=homePath
}
// This order should be enforced since the survey part relies on itreturn []string{specPath, homePath, invocationPath}
}
Given the reliance on the xdg.ConfigFile function, the initial message might be a bit misleading for people using gh act. The existing docs aren't so clear about it also.
Maybe introduce a different message for people using different installation methods or update the docs to clarify the location of the config file?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When running the
act
command for the first time via the GitHub CLI extension (gh act
), users are informed with the message:This message suggests that the configuration file (
~/.actrc
) is the primary (or only) place to modify the default settings. However, the underlying code supports multiple locations for the configuration file, as outlined by theconfigLocations
function inroot.go
:Given the reliance on the
xdg.ConfigFile
function, the initial message might be a bit misleading for people usinggh act
. The existing docs aren't so clear about it also.Maybe introduce a different message for people using different installation methods or update the docs to clarify the location of the config file?
Beta Was this translation helpful? Give feedback.
All reactions