run_context: add GITHUB_RUN_ATTEMPT (#2458)

* 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>
This commit is contained in:
Ryan
2024-09-19 23:36:09 +02:00
committed by GitHub
parent be89cbcf51
commit a34d9c6d60
3 changed files with 8 additions and 0 deletions

View File

@@ -182,6 +182,7 @@ func TestSetupEnv(t *testing.T) {
"GITHUB_RETENTION_DAYS": "0",
"GITHUB_RUN_ID": "runId",
"GITHUB_RUN_NUMBER": "1",
"GITHUB_RUN_ATTEMPT": "1",
"GITHUB_SERVER_URL": "https://",
"GITHUB_WORKFLOW": "",
"INPUT_STEP_WITH": "with-value",