Skip to content

Instantly share code, notes, and snippets.

@clarkritchie
Created October 25, 2023 14:54
Show Gist options
  • Save clarkritchie/def05211e6dd0ec6a8e1edd48f0f822b to your computer and use it in GitHub Desktop.
Save clarkritchie/def05211e6dd0ec6a8e1edd48f0f822b to your computer and use it in GitHub Desktop.
Print GitHub Secret
# Crazy trick to make GHA show you the value of a secret
- name: Print secret value
env:
FOO_VAL: ${{ secrets.FOO }}
run: |
import os
data = open("file", "w")
for q in (os.getenv("FOO_VAL")):
print(q)
data.write(q)
shell: python
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment