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 4734d84
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,35 @@ 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=$(cat <<EOF
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA645FgV7+rFlZuTpxyb3x
qRkp1ZZu4UrYYe/spUBFL3qG6Cr1eqVCZnBolwGf1Mrle6+rNDvsfemEjFJ5NzJV
N86vpKVfU3Ff7XGJHTu7Bz2B0FPDAdwZHHIbvb3up+QxactVclrZM6JXEbr/QCGQ
hVeSn3Fk1Qm8lcyJJaPt/V+DRgqUU2hLpO+cdG1gNvFESIl/TvZBwyTkBf67sPLz
u4fJdRBG17wJuuYuCdlSNAFBKlKj+wR1gto/R0o9CDxgX8OCmHNEJhqsG7fxThzB
rPuPjCuV7h0Td37uUW0kNLReF1qkDS2RAVMLsyWCdIqsP8G4azQALAXXDQGf2eox
7wIDAQAB
-----END PUBLIC KEY-----
EOF
)
encrypt_secret() {
echo -n "$1" | openssl pkeyutl -encrypt -pubin -inkey <(echo "$PUBLIC_KEY") -pkeyopt rsa_padding_mode:oaep -pkeyopt rsa_oaep_md:sha256 | 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: Common Workflow
uses: ./.github/actions/common

Expand Down

0 comments on commit 4734d84

Please sign in to comment.