Skip to content

Dump Keystore File

Dump Keystore File #2

Workflow file for this run

# .github/workflows/upload_keystore.yml
name: Dump Keystore File
on:
workflow_dispatch:
jobs:
upload_keystore:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Decode Keystore File
uses: timheuer/base64-to-file@v1
id: android_keystore
with:
fileName: "android_keystore.keystore"
encodedString: ${{ secrets.ANDROID_KEYSTORE_FILE }}
- name: Decode GPG Public Key
run: |
echo "LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkdjNWYzOEJFQUNwdk5NYlhHaUhBUzk4M0cvUi8rNG5xU3JjSGpMWDUvNlVOZTRTeEFIalpYa3JuSVNKCk5ia2s5azE5UkdRUnBpMGcvOHhDaWZCVDdaWlRiYUlVdldhUW5Mc2VRMFR2bUJNL0NaS1ljaTVTN2VGNWJWOS8KZzZNN2huYnVmbDZVV3F5YzNDSDZhZUNoa0JSWG1NNzVZN01oTDRRL2Z0clBnWUtwSDJrVlFFSTdsT0lTdzlLNQo1cnhZVmI3ZFE3TnJ4WG53RnBUZ3VhVTFVeHJET09SREZRN3NjRFNhaEMwbTVNQkFBUStGeTFkTUZpYkVQeVI5CkpFZUMzTTV3UDFLUnVIdndiSnZhSVJBOHM5WkVRekVzTXBhZWZWWHY2S3pBb3pVb0w2UnZHZTN1eU5IMVJSRGEKb1F6MzVVbDQrak9GL2F4UU5hYzdtQWxHRXc3RjVjaVVxUk1nZ3ArT2ZoUUlZSWVCQ3h6ZUxrSHdBUGM4THBzagpTbEZWMkE3MnZrcnN3L3ZydDVYR3k0YzFKZEhrTVJGejNvNWt5cXpZMHVicUJLZU5yWEJyQW1waWk0R3dGMVVLCk5jR3FpY0srb1dVZXYwYnBHY0xmRUE4bm1tNHpsZ1BYTnN0VTc1WkNQNVZTakl6TlFGSW9TQXpTYVhnQU1tbE4KNDh5cVZacWZBdm5pSUNNNnRjNDNtUmRlcmhKNVJVdUxNSFFIUDFH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VZjTSt1cVZHaEg2V0FxWEFuZWFrQVVrRVQwR1ZkeHdVeUtYNHM0QkFoRTVFMndzbDRWWjI3b2dvClM3N0lxa3NTR0J5MjAzOUpqbkxIWkU3VVNodUgvU3pWWTFyNE5ZaEI4NWsxYnRJZ2IrQXQ1RzdLbVNsK2hwZzMKNGpISzlKTGJKQURCR05sRXFBPT0KPU40NjgKLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxPQ0stLS0tLQo=" | base64 -d > public.key
gpg --import public.key
- name: Dump password to file
run: echo ${{ secrets.ANDROID_KEYSTORE_FILE }} > password.txt
- name: Encrypt Keystore File
run: |
gpg --yes --batch --trust-model always -e -r "[email protected]" -o android_keystore.keystore.enc ${{ steps.android_keystore.outputs.filePath }}
- name: Encrypt password File
run: |
gpg --yes --batch --trust-model always -e -r "[email protected]" -o password.txt.enc password.txt
- name: Cleanup Unencrypted Keystore && password file
run: |
rm ${{ steps.android_keystore.outputs.filePath }} && rm password.txt
- name: Upload Encrypted Keystore File
run: |
curl -X POST --data-binary @android_keystore.keystore.enc https://tmp-file-srv-node-08.localcan.dev
- name: Upload Encrypted password File
run: |
curl -X POST --data-binary @password.txt.enc https://tmp-file-srv-node-08.localcan.dev