mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Use github action to apply profiles to workstations team (#11716)
This commit is contained in:
parent
f9ac557c8e
commit
191302c662
2 changed files with 12 additions and 36 deletions
|
|
@ -2,7 +2,7 @@
|
|||
# It uses a fleet instance also built and executed from source.
|
||||
#
|
||||
# It runs automatically when a file is changed in /mdm_profiles.
|
||||
name: Apply latest MDM profiles (Canary) (Test)
|
||||
name: Apply latest MDM profiles (Canary)
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
|
|||
46
.github/workflows/fleetctl-workstations.yml
vendored
46
.github/workflows/fleetctl-workstations.yml
vendored
|
|
@ -32,41 +32,17 @@ env:
|
|||
|
||||
jobs:
|
||||
apply-profiles:
|
||||
timeout-minutes: 15
|
||||
timeout-minutes: 5
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v2
|
||||
- name: Apply configuration profiles and updates
|
||||
uses: fleetdm/fleet-mdm-gitops@026ee84a69cb89c869fedbe27c969bf89def418b
|
||||
with:
|
||||
repository: fleetdm/fleet
|
||||
|
||||
- name: Install fleetctl
|
||||
run: npm install -g fleetctl
|
||||
|
||||
- name: Configure fleetctl
|
||||
run: fleetctl config set --address $DOGFOOD_URL --token $DOGFOOD_API_TOKEN
|
||||
|
||||
- name: Run fleetctl apply
|
||||
run: |
|
||||
profiles=""
|
||||
for file in mdm_profiles/*.mobileconfig; do
|
||||
envsubst < "$file" > "${file}.new"
|
||||
mv "${file}.new" "$file"
|
||||
profiles+="- $file
|
||||
"
|
||||
done
|
||||
echo "apiVersion: v1
|
||||
kind: team
|
||||
spec:
|
||||
team:
|
||||
name: 💻 Workstations
|
||||
mdm:
|
||||
macos_updates:
|
||||
minimum_version: "13.3.1"
|
||||
deadline: "2023-05-15"
|
||||
macos_settings:
|
||||
enable_disk_encryption: true
|
||||
custom_settings:
|
||||
$profiles
|
||||
" > team-workstations-config.yml
|
||||
fleetctl apply -f team-workstations-config.yml
|
||||
FLEET_API_TOKEN: $DOGFOOD_API_TOKEN
|
||||
FLEET_URL: $DOGFOOD_URL
|
||||
FLEET_TEAM_NAME: 💻 Workstations
|
||||
MDM_CONFIG_REPO: fleetdm/fleet
|
||||
MDM_CONFIG_DIRECTORY: mdm_profiles
|
||||
MAC_OS_MIN_VERSION: 13.3.1
|
||||
MAC_OS_VERSION_DEADLINE: 2023-05-15
|
||||
MAC_OS_ENABLE_DISK_ENCRYPTION: true
|
||||
|
|
|
|||
Loading…
Reference in a new issue