From 709b8aff661f3e9de8e3831380834b37ff065549 Mon Sep 17 00:00:00 2001 From: Nindi Gill Date: Tue, 13 Aug 2024 10:59:23 +1000 Subject: [PATCH] Perform Fleet server version lookup just-in-time --- .github/gitops-action/action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/gitops-action/action.yml b/.github/gitops-action/action.yml index 17f26da..f2860fc 100644 --- a/.github/gitops-action/action.yml +++ b/.github/gitops-action/action.yml @@ -18,7 +18,9 @@ runs: - name: Install fleetctl shell: bash working-directory: ${{ inputs.working-directory }} - run: npm install -g fleetctl + run: | + FLEET_VERSION="$(curl "$FLEET_URL/api/v1/fleet/version" --header "Authorization: Bearer $FLEET_API_TOKEN" --silent | jq --raw-output '.version')" + npm install -g fleetctl@$FLEET_VERSION - name: Configure fleetctl shell: bash