Fix keychain deletion in multi-certificate workflows (Resubmit)#100
Merged
daveisfera merged 1 commit intoApple-Actions:mainfrom Jun 7, 2025
FelixLisczyk:pl-78
Merged
Fix keychain deletion in multi-certificate workflows (Resubmit)#100daveisfera merged 1 commit intoApple-Actions:mainfrom FelixLisczyk:pl-78
daveisfera merged 1 commit intoApple-Actions:mainfrom
FelixLisczyk:pl-78
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue in multi-certificate workflows where the same keychain is attempted to be deleted multiple times by adding a flag check before deletion.
- Introduces a check using the 'create-keychain' input to conditionally delete the keychain.
- Reorders some import statements for consistency.
Comments suppressed due to low confidence (1)
src/main.ts:67
- Consider adding a brief comment or note in the documentation explaining the expected behavior of the 'create-keychain' input value, to clarify its role in the keychain deletion logic.
const didCreateKeychain: boolean = getInput('create-keychain') === 'true'
daveisfera
approved these changes
Jun 7, 2025
Collaborator
|
Thanks for working through this with me! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a resubmission of #74 (see discussion).
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.