Add test action to reproduce issue in normal PR. #5943
Merged
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.
Signed-off-by: Michael Nelson minelson@vmware.com
Description of the change
I used this PR to debug why the installation of the GPG key was failing. The process I used was:
installGPGKeys
command (ls -al /tmp/*.key
) which showed that they had the incorrect size,head -n1
of each (which is just the-----BEGIN PGP PRIVATE KEY BLOCK-----
) (had to also base64 it to avoid it being correctly redacted as it should).This showed clearly that, since I updated the secrets, the GPG data was in fact not being written to disk. After some experimenting, and reading the GH documentation for secrets in actions I realised that the issue could be because these secrets are being passed unquoted to the
installGPGKeys
bash function.Rather than correctly quoting them, I instead removed these cmd-line args from the function so that the env vars can be used more safely (as mentioned in the linked GH doc above, including secrets as cmdline args should be avoided anyway).
This fixed the problem in my tests. Now to see if it's the only issue in CI :)
Benefits
Possible drawbacks
Applicable issues
Additional information