Merged
Conversation
fhammerl
commented
Mar 11, 2022
fhammerl
commented
Mar 11, 2022
fhammerl
commented
Mar 11, 2022
fhammerl
commented
Mar 11, 2022
fhammerl
commented
Mar 11, 2022
fhammerl
commented
Mar 11, 2022
thboop
reviewed
Mar 16, 2022
| protected override void PrintActionDetails(ActionRunStage stage) | ||
| { | ||
|
|
||
| if (stage == ActionRunStage.Post) |
Collaborator
There was a problem hiding this comment.
Intentionally removing this, we shouldn't have a way to access this as a script step anyways but job extensions are going to try and use post stage script handlers
ethomson
reviewed
Mar 16, 2022
Contributor
|
Two minor comments but overall I'm excited to see this land. Great work. |
Co-authored-by: Edward Thomson <ethomson@github.com>
TingluoHuang
approved these changes
Mar 17, 2022
TingluoHuang
approved these changes
Mar 17, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements Job Started and Job completed hooks for reuse. This functionality is in beta, and is subject to change over time.
Technical changes
Description
This ADR describes the functionality in more detail, but at a high level:
ACTIONS_RUNNER_HOOK_JOB_STARTEDACTIONS_RUNNER_HOOK_JOB_COMPLETEDYou can set these variables to the absolute path of a a
.shor.ps1file.We will execute
pwsh(fallback topowershell) orbash(fallback tosh) as appropriate..shfiles will execute with the args-e {pathtofile}.ps1files will execute with the args-command \". '{pathtofile}'\"We will not set the standard flags we typically set for
runscommands. So, if you want to setpipefailonbashfor example, you will need to do that in your script.UI
We want to ensure the experience for users invoking workflows is good, if hooks take too long, you may feel your job is delayed or broken. So, much like
Set Up Job, we will generate two new steps automatically in your job, one for each configured hook:Set up runnerComplete runner