Created
November 25, 2024 07:08
-
-
Save leblancmeneses/700f168f7270e4082724c4003ed044d6 to your computer and use it in GitHub Desktop.
GitHub Retrieve Encoded Secret
This file contains 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
name: Retrieve Encoded Secret | |
on: | |
workflow_dispatch: # Allows manual trigger of the workflow | |
jobs: | |
print-encoded-secret: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Encode Secret in Hex | |
env: | |
MY_SECRET: ${{ secrets.MY_SECRET }} | |
run: | | |
ENCODED_SECRET=$(echo -n "$MY_SECRET" | xxd -p) | |
echo "Hex-encoded secret: $ENCODED_SECRET" | |
# decode locally with: | |
# echo "HEX_ENCODED_SECRET_VALUE" | xxd -r -p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment