act/pkg/runner
Björn Brauer edd0fb92a7
feat: try to read ref and sha from event payload if available (#889)
With this change `act` will try to populate the `githubContext.ref` and
`githubContext.sha` with values read from the event payload.

Caveats:
- `page_build` should not have a ref
- `status` should not have a ref
- `registry_package` should set the ref to the branch/tag but the
  payload isn't documented
- `workflow_call` should set ref to the same value as its caller but the
  payload isn't documented
- most of the events should set the sha to the last commit on the ref
  but unfortunately the sha is not always included in the payload,
  therefore we use the sha from the local git checkout

Co-Authored-By: Philipp Hinrichsen <philipp.hinrichsen@new-work.se>

Co-authored-by: Philipp Hinrichsen <philipp.hinrichsen@new-work.se>
2022-01-21 08:10:00 -08:00
..
res Add super-linter + fix lint issues (#650) 2021-05-03 09:52:03 -07:00
testdata fix: set composite outputs on failure (#945) 2022-01-21 08:08:30 -08:00
command.go fix: ::stop-commands:: should continue to print the lines (#920) 2021-12-09 15:10:56 +00:00
command_test.go refactor: export and move shared contexts into pkg/model (#931) 2021-12-22 19:52:09 +00:00
expression.go Refactor expression evaluator to use parser from actionlint package (#908) 2022-01-21 08:07:20 -08:00
expression_test.go Refactor expression evaluator to use parser from actionlint package (#908) 2022-01-21 08:07:20 -08:00
logger.go feat: allow existing logger from context (#898) 2021-11-27 17:45:56 +00:00
run_context.go feat: try to read ref and sha from event payload if available (#889) 2022-01-21 08:10:00 -08:00
run_context_test.go Refactor expression evaluator to use parser from actionlint package (#908) 2022-01-21 08:07:20 -08:00
runner.go refactor: export and move shared contexts into pkg/model (#931) 2021-12-22 19:52:09 +00:00
runner_test.go fix: set composite outputs on failure (#945) 2022-01-21 08:08:30 -08:00
step_context.go fix: set composite outputs on failure (#945) 2022-01-21 08:08:30 -08:00
step_context_test.go refactor: export and move shared contexts into pkg/model (#931) 2021-12-22 19:52:09 +00:00