Skip to content

Commit

Permalink
Change default to provenance.json instead of build.provenance
Browse files Browse the repository at this point in the history
Signed-off-by: Jeroen Knoops <jeroen.knoops@philips.com>
  • Loading branch information
JeroenKnoops committed Nov 29, 2021
1 parent b5cf8b5 commit dac1c12
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
uses: philips-labs/slsa-provenance-action@v0.4.0
with:
artifact_path: release-assets
output_path: 'build.provenance'
output_path: 'provenance.json'
tag_name: ${{ github.ref_name }}
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion .github/workflows/example-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ jobs:
- name: Upload provenance
uses: actions/upload-artifact@v2
with:
path: build.provenance
path: provenance.json
2 changes: 1 addition & 1 deletion .github/workflows/example-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
- name: Upload provenance
uses: actions/upload-artifact@v2
with:
path: build.provenance
path: provenance.json
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ The easiest way to use this action is to add the following into your workflow fi
uses: philips-labs/slsa-provenance-action@v0.4.0
with:
artifact_path: release-assets
output_path: 'build.provenance'
output_path: 'provenance.json'
tag_name: ${{ github.ref_name }}
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
Expand Down Expand Up @@ -188,7 +188,7 @@ The easiest way to use this action is to add the following into your workflow fi
- name: Upload provenance
uses: actions/upload-artifact@v2
with:
path: build.provenance
path: provenance.json
```

</details>
Expand All @@ -206,7 +206,7 @@ An action to generate SLSA build provenance for an artifact
| parameter | description | required | default |
| - | - | - | - |
| artifact_path | path to artifact or directory of artifacts | `true` | |
| output_path | path to write build provenance file | `true` | build.provenance |
| output_path | path to write build provenance file | `true` | provenance.json |
| github_context | internal (do not set): the "github" context object in json | `true` | ${{ toJSON(github) }} |
| runner_context | internal (do not set): the "runner" context object in json | `true` | ${{ toJSON(runner) }} |
| tag_name | The github release to generate provenance on.
Expand Down
2 changes: 1 addition & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ inputs:
output_path:
description: 'path to write build provenance file'
required: true
default: 'build.provenance'
default: 'provenance.json'
github_context:
description: 'internal (do not set): the "github" context object in json'
required: true
Expand Down
2 changes: 1 addition & 1 deletion cmd/slsa-provenance/cli/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func Generate(w io.Writer) *ffcli.Command {
tagName = flagset.String("tag_name", "", `The github release to generate provenance on.
(if set the artifacts will be downloaded from the release and the provenance will be added as an additional release asset.)`)
artifactPath = flagset.String("artifact_path", "", "The file or dir path of the artifacts for which provenance should be generated.")
outputPath = flagset.String("output_path", "build.provenance", "The path to which the generated provenance should be written.")
outputPath = flagset.String("output_path", "provenance.json", "The path to which the generated provenance should be written.")
githubContext = flagset.String("github_context", "", "The '${github}' context value.")
runnerContext = flagset.String("runner_context", "", "The '${runner}' context value.")
extraMaterials = []string{}
Expand Down
2 changes: 1 addition & 1 deletion lib/github/provenance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func TestGenerateProvenanceFromGitHubRelease(t *testing.T) {
assertMetadata(assert, predicate.Metadata, ghContext, repoURL)
assertInvocation(assert, predicate.Invocation)

stmtPath := path.Join(artifactPath, "build.provenance")
stmtPath := path.Join(artifactPath, "provenance.json")

err = env.PersistProvenanceStatement(ctx, stmt, stmtPath)
assert.NoError(err)
Expand Down

0 comments on commit dac1c12

Please sign in to comment.