mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 10:37:05 +05:30
ci: add back snapshot workflow
This commit is contained in:
parent
fda68b13c0
commit
cd013ef821
7 changed files with 100 additions and 0 deletions
13
scripts/deploy-snapshot.sh
Executable file
13
scripts/deploy-snapshot.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
export SSHDIR="$HOME/.ssh"
|
||||
export SERVER_DEPLOY_STRING="$SSH_USERNAME@$SERVER_ADDRESS:$SERVER_DESTINATION"
|
||||
mkdir -p "$SSHDIR"
|
||||
echo "$ACTIONS_DEPLOY_KEY" > "$SSHDIR/key"
|
||||
chmod 600 "$SSHDIR/key"
|
||||
mkdir -p "$GITHUB_WORKSPACE/Claw"
|
||||
cp -v ./android/build/outputs/apk/release/android-release.apk "$GITHUB_WORKSPACE/Claw/Claw.apk"
|
||||
cd "$GITHUB_WORKSPACE/Claw"
|
||||
rsync -ahvcr --omit-dir-times --progress --delete --no-o --no-g -e "ssh -i $SSHDIR/key -o StrictHostKeyChecking=no -p $SSH_PORT" . "$SERVER_DEPLOY_STRING"
|
16
scripts/encrypt-secret.sh
Executable file
16
scripts/encrypt-secret.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Simple script that uses OpenSSL to encrypt a provided file with a provided key, and writes the result
|
||||
# to the provided path. Yes it's very needy.
|
||||
|
||||
INPUT_FILE="${1:-}"
|
||||
OUTPUT_FILE="${2:-}"
|
||||
ENCRYPT_KEY="${3:-}"
|
||||
|
||||
if [[ -n "$ENCRYPT_KEY" && -n "$INPUT_FILE" && -n "$OUTPUT_FILE" ]]; then
|
||||
openssl enc -aes-256-cbc -md sha256 -pbkdf2 -e -in "${INPUT_FILE}" -out "${OUTPUT_FILE}" -k "${ENCRYPT_KEY}"
|
||||
else
|
||||
echo "Usage: ./encrypt-secret.sh <input file> <output file> <encryption key>"
|
||||
fi
|
9
scripts/signing-cleanup.sh
Executable file
9
scripts/signing-cleanup.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Delete Release key
|
||||
rm -f keystore.jks
|
||||
|
||||
# Delete signing config
|
||||
rm -f keystore.properties
|
17
scripts/signing-setup.sh
Executable file
17
scripts/signing-setup.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
ENCRYPT_KEY="${1:-}"
|
||||
|
||||
declare -A SECRETS
|
||||
SECRETS[secrets/keystore.cipher]=keystore.jks
|
||||
SECRETS[secrets/props.cipher]=keystore.properties
|
||||
|
||||
if [[ -n "$ENCRYPT_KEY" ]]; then
|
||||
for src in "${!SECRETS[@]}"; do
|
||||
openssl enc -aes-256-cbc -md sha256 -pbkdf2 -d -in "${src}" -out "${SECRETS[${src}]}" -k "${ENCRYPT_KEY}"
|
||||
done
|
||||
else
|
||||
echo "Usage: ./signing-setup.sh <encryption key>"
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue