actions: style

This commit is contained in:
2026-10-12 03:59:11 +02:00
parent d03a144566
commit c0399df117
3 changed files with 5 additions and 4 deletions
-4
View File
@@ -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."
+3
View File
@@ -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
+2
View File
@@ -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