From c0399df117c9aad980a7258524f5843e474aa99b Mon Sep 17 00:00:00 2001 From: alessandrovitali Date: Mon, 12 Oct 2026 03:59:11 +0200 Subject: [PATCH] actions: style --- sops/action.yml | 4 ---- ssh-copy/action.yml | 3 +++ ssh-run/action.yml | 2 ++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sops/action.yml b/sops/action.yml index d3942c6..51c31e9 100644 --- a/sops/action.yml +++ b/sops/action.yml @@ -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." diff --git a/ssh-copy/action.yml b/ssh-copy/action.yml index 8a6bb34..f774141 100644 --- a/ssh-copy/action.yml +++ b/ssh-copy/action.yml @@ -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 diff --git a/ssh-run/action.yml b/ssh-run/action.yml index 3be1c1c..5606760 100644 --- a/ssh-run/action.yml +++ b/ssh-run/action.yml @@ -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