@@ -78,7 +78,10 @@ func (action *AttestationPush) Run(ctx context.Context, attestationID string, ru
7878 }
7979
8080 // Retrieve attestation status
81- statusAction , err := NewAttestationStatus (& AttestationStatusOpts {ActionsOpts : action .ActionsOpts , UseAttestationRemoteState : useRemoteState })
81+ statusAction , err := NewAttestationStatus (& AttestationStatusOpts {
82+ ActionsOpts : action .ActionsOpts , UseAttestationRemoteState : useRemoteState , SkipReleaseInfo : true ,
83+ })
84+
8285 if err != nil {
8386 return nil , fmt .Errorf ("creating status action: %w" , err )
8487 }
@@ -172,7 +175,9 @@ func (action *AttestationPush) Run(ctx context.Context, attestationID string, ru
172175 return attestationResult , nil
173176 }
174177
175- attestationResult .Digest , err = pushToControlPlane (ctx , action .ActionsOpts .CPConnection , envelope , crafter .CraftingState .Attestation .GetWorkflow ().GetWorkflowRunId ())
178+ workflow := crafter .CraftingState .Attestation .GetWorkflow ()
179+
180+ attestationResult .Digest , err = pushToControlPlane (ctx , action .ActionsOpts .CPConnection , envelope , workflow .GetWorkflowRunId (), workflow .GetProjectVersion ().GetMarkAsReleased ())
176181 if err != nil {
177182 return nil , fmt .Errorf ("pushing to control plane: %w" , err )
178183 }
@@ -187,16 +192,17 @@ func (action *AttestationPush) Run(ctx context.Context, attestationID string, ru
187192 return attestationResult , nil
188193}
189194
190- func pushToControlPlane (ctx context.Context , conn * grpc.ClientConn , envelope * dsse.Envelope , workflowRunID string ) (string , error ) {
195+ func pushToControlPlane (ctx context.Context , conn * grpc.ClientConn , envelope * dsse.Envelope , workflowRunID string , markVersionAsReleased bool ) (string , error ) {
191196 encodedAttestation , err := encodeEnvelope (envelope )
192197 if err != nil {
193198 return "" , fmt .Errorf ("encoding attestation: %w" , err )
194199 }
195200
196201 client := pb .NewAttestationServiceClient (conn )
197202 resp , err := client .Store (ctx , & pb.AttestationServiceStoreRequest {
198- Attestation : encodedAttestation ,
199- WorkflowRunId : workflowRunID ,
203+ Attestation : encodedAttestation ,
204+ WorkflowRunId : workflowRunID ,
205+ MarkVersionAsReleased : & markVersionAsReleased ,
200206 })
201207
202208 if err != nil {
0 commit comments