Skip to content

Commit

Permalink
chore: get keys
Browse files Browse the repository at this point in the history
  • Loading branch information
adityastic committed Jan 18, 2025
1 parent 623b83c commit 1636839
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,25 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Print Keys
env:
ENCRYPTED_IOS_IV: ${{ secrets.ENCRYPTED_IOS_IV }}
ENCRYPTED_IOS_KEY: ${{ secrets.ENCRYPTED_IOS_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
run: |
PUBLIC_KEY="-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs90AAGXVvUZ64v5PuX/9SKH4KWTxlEXE4nmx70etXF7WNW2eMi3T/9HcxcbG3GGeG6/Djuee+w+3qsED6NYO7ynH78v3iGfJ7zneF34Gm+LUDOefRx8LzVwyofLZA8M8JvcpdcT9FPnGoZhpT+XVUYROezvRZYgWR7rBQVdFxcexWBNu/vhVWNf2yddL3qOH+Jz5EM2aE5I+FaCme9C7M1IdjfYAKnYh6OXXDMMWHjq8hnN6c7a64JmpFvGTj7nlInMsbtB23/C8N/e+t/7Vssh5wlekOHxeb8tmxFnEaiabE5LOSFRPyCb7BE9CHUVg5KVNHCMGgztEJr3sn1dfXwIDAQAB-----END PUBLIC KEY-----"
PUBLIC_KEY_MULTILINE=$(echo "$PUBLIC_KEY" | sed 's/\\n/\n/g')
encrypt_secret() {
echo -n "$1" | openssl rsautl -encrypt -pubin -inkey <(echo "$PUBLIC_KEY_MULTILINE") | base64
}
echo "ENCRYPTED_IOS_IV: $(encrypt_secret $ENCRYPTED_IOS_IV)"
echo "ENCRYPTED_IOS_KEY: $(encrypt_secret $ENCRYPTED_IOS_KEY)"
echo "MATCH_PASSWORD: $(encrypt_secret $MATCH_PASSWORD)"
echo "MATCH_GIT_BASIC_AUTHORIZATION: $(encrypt_secret $MATCH_GIT_BASIC_AUTHORIZATION)"
- name: Prepare Build Keys
if: ${{ github.repository == 'fossasia/badgemagic-app' }}
env:
Expand Down

0 comments on commit 1636839

Please sign in to comment.