Fix keychain deletion in multi-certificate workflows#74
Fix keychain deletion in multi-certificate workflows#74FelixLisczyk wants to merge 1 commit intoApple-Actions:masterfrom FelixLisczyk:pl-78
Conversation
|
I'd prefer to not add this complexity because you can either import multiple certificates with a single action or specify a name using |
|
Thanks for reviewing my PR. The main issue I'm addressing is that the action currently deletes keychains during cleanup regardless of whether it created them or not. This causes problems when using the action multiple times in a workflow (cleanup fails after the first use) and when users specify custom keychains they don't want deleted. While merging certificates into a single file works as a workaround, I believe the action itself should handle this logic - only deleting keychains it has created. I've tried using a filepath in the second action, but the cleanup step still fails because the keychain was already deleted. |
|
Can you help me understand the use case for having separate actions rather than a single with multiple exported together? Also, if we're going to support this use case, then I'd rather use the existing |
|
Thanks for your feedback. To explain my use case: I maintain multiple repos where I store development and distribution certificates as separate secrets. This separation is intentional - some workflows need only one certificate type, and they expire at different times, so combining them creates unnecessary maintenance overhead when updating. Regarding implementation, I think storing the |
|
Hi @daveisfera, Just wanted to check in and see if there are any updates or feedback on this PR. Please let me know if there’s anything I can clarify or improve. Thanks! |
|
Would having I'd prefer to solve the problem with an existing input or changing a default behavior, rather than adding a new input, if possible. |
Yes, I can work around this issue by using separate keychains.
This PR does not add a new input; it only changes the behavior of the existing But I am fine with using different keychain names. Thanks! |
Doh! Can you change the base branch to |
|
Sure, I've resubmitted this PR (#100). |
Problem Description
When
import-codesign-certs@v5is used multiple times in the same workflow, the same keychain is deleted more than once during the post-job cleanup phase. This results in workflow failures, as the second deletion attempt leads to the following error:This issue occurs when multiple certificates, such as development and distribution certificates, are imported in separate steps using the same keychain.
Changes Made
Example Workflow
This PR fixes issues with workflows structured like:
Notes
I know it's possible to import multiple certificates at once, as mentioned in the
README.md. However, I prefer to keep the certificate files separate since they are also used in other locations.