From 3cdba561a313217b22dc79ae30fdccfe1620ed30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mond=C3=A9jar=20Rubio?= Date: Sun, 18 May 2025 16:10:26 +0200 Subject: [PATCH] Safer GH action execution for sh shells (#2159) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Safer GH action execution for sh shells Signed-off-by: Álvaro Mondéjar Rubio * Remove o and pipefail Signed-off-by: Álvaro Mondéjar Rubio * Use sh instead of bash Signed-off-by: Álvaro Mondéjar Rubio * Revert change Signed-off-by: Álvaro Mondéjar Rubio * Fix error Signed-off-by: Álvaro Mondéjar Rubio --------- Signed-off-by: Álvaro Mondéjar Rubio --- action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 3c3b1663..8fd7804a 100644 --- a/action.yml +++ b/action.yml @@ -7,7 +7,9 @@ runs: - name: Install cargo-binstall if: runner.os != 'Windows' shell: sh - run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash + run: | + set -eu + (curl --retry 10 -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh || echo 'exit 1') | bash - name: Install cargo-binstall if: runner.os == 'Windows' run: Set-ExecutionPolicy Unrestricted -Scope Process; iex (iwr "https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.ps1").Content