Fix - packging workflow for docker push

This commit is contained in:
naveen 2021-02-12 16:25:11 -05:00 committed by Naveen
parent c77e995ae5
commit 4bdc158018
2 changed files with 20 additions and 0 deletions

View File

@ -112,6 +112,11 @@ func isPackagingWorkflow(s string, fp string, c checker.Checker) bool {
return true
}
if strings.Contains(s, "docker push") {
c.Logf("found docker publishing workflow: %s", fp)
return true
}
c.Logf("!! not a packaging workflow: %s", fp)
return false
}

View File

@ -26,5 +26,20 @@ var _ = Describe("E2E TEST:Packaging", func() {
Expect(result.Error).Should(BeNil())
Expect(result.Pass).Should(BeTrue())
})
It("Should return use of packaging in CI/CD for scorecard", func() {
l := log{}
checker := checker.Checker{
Ctx: context.Background(),
Client: ghClient,
HttpClient: client,
Owner: "ossf",
Repo: "scorecard",
GraphClient: graphClient,
Logf: l.Logf,
}
result := checks.Packaging(checker)
Expect(result.Error).Should(BeNil())
Expect(result.Pass).Should(BeTrue())
})
})
})