actions: style
This commit is contained in:
@@ -40,7 +40,6 @@ runs:
|
||||
SOPS_AGE_KEY: ${{ inputs.sops-age-key }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
echo "searching for SOPS files to decrypt..."
|
||||
|
||||
while IFS= read -r -d '' file; do
|
||||
@@ -48,9 +47,7 @@ runs:
|
||||
output_file="$dir/${base/.sops/}"
|
||||
|
||||
echo "decrypting '$file' to '$output_file'"
|
||||
|
||||
tmp=$(mktemp "$dir/.sops-decrypt.XXXXXX")
|
||||
|
||||
if ! sops --decrypt "$file" > "$tmp" || [ ! -s "$tmp" ]; then
|
||||
echo "decryption of '$file' failed or produced empty output" >&2
|
||||
rm -f "$tmp"
|
||||
@@ -60,5 +57,4 @@ runs:
|
||||
chmod 600 "$tmp"
|
||||
mv "$tmp" "$output_file"
|
||||
done < <(find . -type f -name "*.sops.*" -not -name ".sops.yaml" -print0)
|
||||
|
||||
echo "SOPS decryption complete."
|
||||
|
||||
@@ -29,6 +29,7 @@ runs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
command -v rsync >/dev/null && exit 0
|
||||
|
||||
sudo apt-get -qq update
|
||||
sudo apt-get -yqq install rsync
|
||||
|
||||
@@ -41,8 +42,10 @@ runs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p ~/.ssh
|
||||
|
||||
printf '%s\n' "$SSH_KEY" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
|
||||
ssh-keyscan -p "$PORT" -H "$HOST" >> ~/.ssh/known_hosts
|
||||
chmod 600 ~/.ssh/known_hosts
|
||||
|
||||
|
||||
@@ -30,8 +30,10 @@ runs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p ~/.ssh
|
||||
|
||||
printf '%s\n' "$SSH_KEY" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
|
||||
ssh-keyscan -p "$PORT" -H "$HOST" >> ~/.ssh/known_hosts
|
||||
chmod 600 ~/.ssh/known_hosts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user