-
Notifications
You must be signed in to change notification settings - Fork 872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop pull and build docker image for action multiple times #79
Conversation
@jclem for review |
@thboop - can you have a look? |
Thanks for adding L0 tests ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor thoughts + test updates, then it looks good
public string WorkingDirectory { get; set; } | ||
} | ||
|
||
public class ActionContainer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could consider making this a Container class and having ContainerSetupInfo have a reference to that class and and its list of StepId's. If we felt like we wanted to preserve the hard typing for ActionContainers, we can do that by creating a Container class, then an ActionContainer class that inherits from it with its new field of ActionRepository.
It might make maintenance easier down the line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Assert.Equal((steps[0].Data as ContainerSetupInfo).StepId, actionId); | ||
Assert.Equal((steps[0].Data as ContainerSetupInfo).WorkingDirectory, Path.Combine(Path.GetDirectoryName(watermarkFile), "master")); | ||
Assert.Equal((steps[0].Data as ContainerSetupInfo).Dockerfile, Path.Combine(Path.GetDirectoryName(watermarkFile), "master", "images/cli", "Dockerfile")); | ||
Assert.Equal((steps[0].Data as ActionsContainerSetupInfo).StepIds[0], actionId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you want ContainerSetupInfo, I don't think the ActionsContainerSetupInfo class exists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
} | ||
else | ||
{ | ||
setupInfo.ActionRepository = $"{repositoryReference.Name}@{repositoryReference.Ref}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the decision to include ref here and a few lines up, matches nicely with how docker does things!
src/Runner.Worker/ActionManager.cs
Outdated
setupInfo.WorkingDirectory = destDirectory; | ||
return setupInfo; | ||
|
||
// return new ContainerSetupInfo(dockerFileLowerCase, destDirectory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may just want to remove this, we can always see it in the git history
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
|
||
Assert.Equal((steps[4].Data as ActionsContainerSetupInfo).StepIds[0], actionId8); | ||
Assert.Equal((steps[4].Data as ActionsContainerSetupInfo).WorkingDirectory, Path.Combine(Path.GetDirectoryName(watermarkFile), "master")); | ||
Assert.Equal((steps[4].Data as ActionsContainerSetupInfo).Dockerfile, Path.Combine(Path.GetDirectoryName(watermarkFile), "master", "images/cli", "Dockerfile")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like these test cases 👍
8fc1163
to
3001ff8
Compare
Ability to use custom GitHub Actions Runner forks
* Default value for choice input workflow_dispatch * Disable inputs context for workflow_dispatch, still no sign on github.com * Add Test
https://github.com/github/dreamlifter/issues/1220