We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df3827a commit 698bce2Copy full SHA for 698bce2
.github/gitops-action/action.yml
@@ -18,7 +18,15 @@ runs:
18
- name: Install fleetctl
19
shell: bash
20
working-directory: ${{ inputs.working-directory }}
21
- run: npm install -g fleetctl
+ run: |
22
+ FLEET_VERSION="$(curl "$FLEET_URL/api/v1/fleet/version" --header "Authorization: Bearer $FLEET_API_TOKEN" --fail --silent | jq --raw-output '.version')"
23
+
24
+ if [[ -n "$FLEET_VERSION" ]] ; then
25
+ npm install -g "fleetctl@$FLEET_VERSION"
26
+ else
27
+ echo "Failed to get Fleet version from $FLEET_URL, installing latest version of fleetctl"
28
+ npm install -g fleetctl
29
+ fi
30
31
- name: Configure fleetctl
32
0 commit comments