How to debug a Github Actions’ secret

How to debug a Github Actions’ secret:

 One irritating thing about Github Actions is you can’t debug secrets. If you try to debug secrets you’ll get *** in the log.

run echo

This makes sense because Github is trying to help us keep the secret secret (ha!). But it doesn’t help when we’re trying to figure out whether there’s something wrong with the secret we provided.

There’s still a way to show this secret if you really want to show it. You can separate the characters with a space using the following code. The secret will now show up.

run: echo $ | sed 's/./& /g'
separate characters with a space

That said, make sure you’re testing a fake secret if you use this method, since this secret will get logged into the Github Actions panel for everyone to see.

from Tumblr https://generouspiratequeen.tumblr.com/post/646977868891619328

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s