From 4a55cb03e3890848a4e21e2249614290ae0aef04 Mon Sep 17 00:00:00 2001 From: Luke Heath Date: Mon, 2 Mar 2026 16:15:08 -0600 Subject: [PATCH 1/2] Add gitops action to build fleetctl from RC --- .github/gitops-actions-rc/action.yml | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/gitops-actions-rc/action.yml diff --git a/.github/gitops-actions-rc/action.yml b/.github/gitops-actions-rc/action.yml new file mode 100644 index 0000000..57dbd6a --- /dev/null +++ b/.github/gitops-actions-rc/action.yml @@ -0,0 +1,48 @@ +name: fleetctl-gitops-rc +description: Builds fleetctl gitops from specified branch to apply configuration to Fleet + +inputs: + working-directory: + description: 'The working directory, which should be the root of the fleet-gitops repository.' + default: './' + fleet-branch: + description: 'The branch of fleetdm/fleet to clone and build fleetctl from.' + required: true + dry-run-only: + description: 'Whether to only run the fleetctl gitops commands in dry-run mode.' + default: 'false' + delete-other-teams: + description: 'Whether to delete other teams in Fleet which are not part of the gitops config.' + default: 'true' + +runs: + using: "composite" + steps: + - name: Clone fleet repository + shell: bash + run: git clone --branch ${{ inputs.fleet-branch }} --depth 1 https://github.com/fleetdm/fleet.git /tmp/fleet + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: /tmp/fleet/go.mod + + - name: Build fleetctl + shell: bash + working-directory: /tmp/fleet + run: | + make build + echo "/tmp/fleet/build" >> "$GITHUB_PATH" + + - name: Configure fleetctl + shell: bash + working-directory: ${{ inputs.working-directory }} + run: fleetctl config set --address ${{ env.FLEET_URL }} --token ${{ env.FLEET_API_TOKEN }} + + - name: Run fleetctl gitops commands + shell: bash + working-directory: ${{ inputs.working-directory }} + env: + FLEET_DRY_RUN_ONLY: ${{ inputs.dry-run-only }} + FLEET_DELETE_OTHER_TEAMS: ${{ inputs.delete-other-teams }} + run: ./gitops.sh From 039ba9455eef54b83695e497331135a97784ad18 Mon Sep 17 00:00:00 2001 From: Luke Heath Date: Mon, 2 Mar 2026 17:38:47 -0600 Subject: [PATCH 2/2] Rename action --- .github/{gitops-actions-rc => gitops-action-rc}/action.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{gitops-actions-rc => gitops-action-rc}/action.yml (100%) diff --git a/.github/gitops-actions-rc/action.yml b/.github/gitops-action-rc/action.yml similarity index 100% rename from .github/gitops-actions-rc/action.yml rename to .github/gitops-action-rc/action.yml