From dae103f6cf22426939a3c8ea93278529e0cd22ff Mon Sep 17 00:00:00 2001 From: jordanstephens Date: Mon, 26 Jan 2026 16:51:40 -0800 Subject: [PATCH] avoid repeatedly installing defang if the action is used multiple times in a single job --- action.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index ecfb0ef..63ca8aa 100644 --- a/action.yaml +++ b/action.yaml @@ -48,7 +48,10 @@ runs: steps: - name: Install defang shell: bash - run: . <(curl -Lf https://raw.githubusercontent.com/DefangLabs/defang/main/src/bin/install || echo return $?) + run: | + if ! which defang >/dev/null 2>&1; then + . <(curl -Lf https://raw.githubusercontent.com/DefangLabs/defang/main/src/bin/install || echo return $?) + fi env: DEFANG_INSTALL_VERSION: ${{ inputs['cli-version'] }} GH_TOKEN: ${{ github.token }} # avoid rate-limits