Skip to content

Commit

Permalink
Remove job part in entrypoint.
Browse files Browse the repository at this point in the history
Only keep action_path, which is unique

Signed-off-by: Jeroen Knoops <jeroen.knoops@philips.com>
  • Loading branch information
JeroenKnoops committed Dec 5, 2022
1 parent 25097a8 commit b7483c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/github/provenance.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (e *Environment) GenerateProvenanceStatement(ctx context.Context, subjecter
// See https://github.com/github/feedback/discussions/4188
intoto.WithInvocation(
BuildType,
fmt.Sprintf("%s:%s", e.Context.ActionPath, e.Context.Job),
e.Context.ActionPath,
nil,
event.Inputs,
[]intoto.Item{
Expand Down
4 changes: 1 addition & 3 deletions pkg/github/provenance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ func TestGenerateProvenance(t *testing.T) {
Event: []byte(pushGitHubEvent),
EventName: "push",
ActionPath: ".github/workflows/build.yml",
Job: "job-context",
SHA: "849fb987efc0c0fc72e26a38f63f0c00225132be",
}
materials := []intoto.Item{
Expand Down Expand Up @@ -302,7 +301,6 @@ func TestGenerateProvenanceFromGitHubRelease(t *testing.T) {
Event: []byte(pushGitHubEvent),
EventName: "push",
ActionPath: ".github/workflows/build.yml",
Job: "job-context",
SHA: "849fb987efc0c0fc72e26a38f63f0c00225132be",
}
materials := []intoto.Item{
Expand Down Expand Up @@ -406,7 +404,7 @@ func TestGenerateProvenanceFromGitHubReleaseErrors(t *testing.T) {
}

func assertInvocation(assert *assert.Assertions, recipe intoto.Invocation) {
assert.Equal(".github/workflows/build.yml:job-context", recipe.ConfigSource.EntryPoint)
assert.Equal(".github/workflows/build.yml", recipe.ConfigSource.EntryPoint)
assert.Nil(recipe.Environment)
assert.Nil(recipe.Parameters)
}
Expand Down

0 comments on commit b7483c6

Please sign in to comment.