[Solved] help in creating a custom image

I’m trying to create my custom image, but GitHub actions is giving this error:

0s
Run cosign sign -y --key env://COSIGN_PRIVATE_KEY ghcr.io/heus-sueh/viper@${TAGS}
Error: signing [ghcr.io/heus-sueh/viper@sha256:4dbc211038bc50134b32126e3300d8817dab1494fa9a6ffb1baaad1d3b0d33d4]: getting signer: reading key: invalid pem block
main.go:74: error during command execution: signing [ghcr.io/heus-sueh/viper@sha256:4dbc211038bc50134b32126e3300d8817dab1494fa9a6ffb1baaad1d3b0d33d4]: getting signer: reading key: invalid pem block
Error: Process completed with exit code 1.

how can I solve?

Did you generate a keypair and put it in the right field in github? Also the key shouldn’t have a password.

I managed to solve it, I was putting a password in the key, the instructions in the documentation were not clear to me on this page:

These instructions are only available in the “Manual Setup”:

inside your repo folder - Do NOT put in a password when it asks you to, just press enter. The signing key will be used in GitHub Actions and will not work if it is encrypted.