mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-11 17:50:58 +00:00
feature: Add support for github action variables (#1833)
* feature: Add support for github action variables * add --var flag for github variables * unitests: Updated unittests to cover vars context. * Remove syntax extension for vars and correct unit tests * Update pkg/runner/expression.go Co-authored-by: ChristopherHX <christopher.homberger@web.de> --------- Co-authored-by: kuanyong-wong-partior <kuanyong.wong@partior.com> Co-authored-by: ChristopherHX <christopher.homberger@web.de>
This commit is contained in:
parent
478b378cd6
commit
376c3ab8f3
7 changed files with 38 additions and 0 deletions
|
@ -16,6 +16,7 @@ type Input struct {
|
|||
reuseContainers bool
|
||||
bindWorkdir bool
|
||||
secrets []string
|
||||
vars []string
|
||||
envs []string
|
||||
inputs []string
|
||||
platforms []string
|
||||
|
@ -26,6 +27,7 @@ type Input struct {
|
|||
envfile string
|
||||
inputfile string
|
||||
secretfile string
|
||||
varfile string
|
||||
insecureSecrets bool
|
||||
defaultBranch string
|
||||
privileged bool
|
||||
|
@ -78,6 +80,10 @@ func (i *Input) Secretfile() string {
|
|||
return i.resolve(i.secretfile)
|
||||
}
|
||||
|
||||
func (i *Input) Varfile() string {
|
||||
return i.resolve(i.varfile)
|
||||
}
|
||||
|
||||
// Workdir returns path to workdir
|
||||
func (i *Input) Workdir() string {
|
||||
return i.resolve(".")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue