1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-16 18:01:34 +00:00

chore: run_context: add GITHUB_RUN_ATTEMPT (#2458) (#817)

* run_context: add GITHUB_RUN_ATTEMPT

Fixes https://github.com/nektos/act/issues/2451
Fixes https://github.com/nektos/act/issues/1615

* fix whitespace

* fix githubcontext

* fix TestSetupEnv

---------

Co-authored-by: ChristopherHX <christopher.homberger@web.de>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 4178166d289bae351ef6d33414cc569518e62a01)

```
Conflicts:
	act/runner/run_context.go
    trivial context conflict
	act/runner/step_test.go
    the corresponding test was removed in the Forgejo runner
```

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/817): <!--number 817 --><!--line 0 --><!--description Y2hvcmU6IHJ1bl9jb250ZXh0OiBhZGQgR0lUSFVCX1JVTl9BVFRFTVBUICgjMjQ1OCk=-->chore: run_context: add GITHUB_RUN_ATTEMPT (#2458)<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: Ryan <cattm@protonmail.com>
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/817
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
This commit is contained in:
earl-warren 2025-08-07 08:02:28 +00:00
parent 96891ab314
commit 79285e896b
No known key found for this signature in database
GPG key ID: F128CBE6AB3A7201
2 changed files with 7 additions and 0 deletions

View file

@ -13,6 +13,7 @@ type GithubContext struct {
Event map[string]interface{} `json:"event"`
EventPath string `json:"event_path"`
Workflow string `json:"workflow"`
RunAttempt string `json:"run_attempt"`
RunID string `json:"run_id"`
RunNumber string `json:"run_number"`
Actor string `json:"actor"`