Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: laurentsimon <laurentsimon@google.com>
  • Loading branch information
laurentsimon committed Jul 14, 2023
1 parent e076f98 commit 56550e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/generator_generic_slsa3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,4 @@ jobs:
[ "$CONTINUE" == "true" ] || [ "$SUCCESS" == "true" ] || exit 27
# cleanup deletes internal artifacts used by the generator workflow
cleanup:
runs-on: ubuntu-latest
needs: [detect-env, generator, upload-assets]
steps:
- uses: geekyeggo/delete-artifact@54ab544f12cdb7b71613a16a2b5a37a9ade990af # v2.0.0
with:
name: "${{ needs.generator.outputs.subject-artifact-name }}"
# TODO(#2382): Delete artifacts ${{ needs.generator.outputs.subject-artifact-name }}
15 changes: 3 additions & 12 deletions internal/builders/generic/attest.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ func attestCmd(provider slsa.ClientProvider, check func(error),
) *cobra.Command {
var attPath string
var subjectsFilename string
var subjects string

c := &cobra.Command{
Use: "attest",
Expand All @@ -52,13 +51,9 @@ run in the context of a Github Actions workflow.`,
ghContext, err := github.GetWorkflowContext()
check(err)

// If not sujects are provided, read from the file instead.
if subjects == "" {
subjectsBytes, err := utils.SafeReadFile(subjectsFilename)
check(err)
subjects = string(subjectsBytes)
}
parsedSubjects, err := parseSubjects(subjects)
subjectsBytes, err := utils.SafeReadFile(subjectsFilename)
check(err)
parsedSubjects, err := parseSubjects(string(subjectsBytes))
check(err)
if len(parsedSubjects) == 0 {
check(errors.New("expected at least one subject"))
Expand Down Expand Up @@ -142,9 +137,5 @@ run in the context of a Github Actions workflow.`,
&subjectsFilename, "subjects-filename", "f", "",
"Filename containing a formatted list of subjects in the same format as sha256sum (base64 encoded).",
)
c.Flags().StringVarP(
&subjects, "subjects", "s", "",
"A formatted list of subjects in the same format as sha256sum (base64 encoded).",
)
return c
}

0 comments on commit 56550e3

Please sign in to comment.