feat: log parsed commands and step summary (#2761)

* feat: log parsed command data in json logger

* Could be used to upload the GITHUB_STEP_SUMMARY by downstream Projects
* You can see the summary and other commands
* Access the raw line of most commands

* Update step.go

* Update step.go

* Update push.yml

* .

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
ChristopherHX
2025-06-01 23:30:40 +02:00
committed by GitHub
parent 8106502726
commit 1154f0d984
8 changed files with 89 additions and 36 deletions

View File

@@ -187,6 +187,7 @@ func TestStepActionRemote(t *testing.T) {
return nil
})
cm.On("GetContainerArchive", ctx, "/var/run/act/workflow/SUMMARY.md").Return(io.NopCloser(&bytes.Buffer{}), nil)
cm.On("GetContainerArchive", ctx, "/var/run/act/workflow/pathcmd.txt").Return(io.NopCloser(&bytes.Buffer{}), nil)
}
@@ -195,9 +196,9 @@ func TestStepActionRemote(t *testing.T) {
err = sar.main()(ctx)
}
assert.Equal(t, tt.runError, err)
assert.ErrorIs(t, err, tt.runError)
assert.Equal(t, tt.mocks.cloned, clonedAction)
assert.Equal(t, tt.result, sar.RunContext.StepResults["step"])
assert.Equal(t, sar.RunContext.StepResults["step"], tt.result)
sarm.AssertExpectations(t)
cm.AssertExpectations(t)
@@ -599,6 +600,7 @@ func TestStepActionRemotePost(t *testing.T) {
return nil
})
cm.On("GetContainerArchive", ctx, "/var/run/act/workflow/SUMMARY.md").Return(io.NopCloser(&bytes.Buffer{}), nil)
cm.On("GetContainerArchive", ctx, "/var/run/act/workflow/pathcmd.txt").Return(io.NopCloser(&bytes.Buffer{}), nil)
}