Exemplo n.º 1
0
 public static IJobBuilder Checkout(this IJobBuilder job, int fetchDepth = 0)
 {
     job.AddStep("Checkout")
     .Uses("actions/checkout@v2")
     .With("fetch-depth", fetchDepth.ToString());
     return(job);
 }
Exemplo n.º 2
0
 public static IJobBuilder PrintEnvironment(this IJobBuilder job)
 {
     job.AddStep("Print Environment")
     .Run("printenv")
     .ShellBash();
     return(job);
 }
Exemplo n.º 3
0
 public static IJobBuilder UploadArtifacts(
     this IJobBuilder job,
     string name = "artifacts",
     string path = "artifacts")
 {
     job.AddStep("Upload artifacts")
     .Uses("actions/upload-artifact@v2")
     .With("name", name)
     .With("path", path);
     return(job);
 }
Exemplo n.º 4
0
 public static IJobBuilder LogIntoGitHubContainerRegistry(this IJobBuilder job)
 {
     job.AddStep("Log into GitHub Container Registry")
     .Run("echo \"${{secrets.GITHUB_TOKEN}}\" | docker login ghcr.io -u ${{github.actor}} --password-stdin");
     return(job);
 }