-
Notifications
You must be signed in to change notification settings - Fork 13
42 lines (36 loc) · 1.32 KB
/
workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: 'Apply latest configuration to Fleet'
on:
push:
branches:
- main
pull_request:
workflow_dispatch: # allows manual triggering
# Prevent concurrent runs of this workflow.
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
defaults:
run:
shell: bash
# Limit permissions of GITHUB_TOKEN.
permissions:
contents: read
jobs:
fleet-gitops:
runs-on: ubuntu-latest
steps:
- name: Checkout GitOps repository
uses: actions/checkout@v4
- name: Apply latest configuration to Fleet
uses: ./.github/gitops-action
with:
# Run GitOps in dry-run mode for pull requests.
dry-run-only: ${{ github.event_name == 'pull_request' && 'true' || 'false' }}
# Add FLEET_URL and FLEET_API_TOKEN to the repository secrets.
# In addition, specify or add secrets for all the environment variables that are mentioned in the global/team YAML files.
env:
FLEET_URL: ${{ secrets.FLEET_URL }}
FLEET_API_TOKEN: ${{ secrets.FLEET_API_TOKEN }}
FLEET_GLOBAL_ENROLL_SECRET: ${{ secrets.FLEET_GLOBAL_ENROLL_SECRET }}
FLEET_WORKSTATIONS_ENROLL_SECRET: ${{ secrets.FLEET_WORKSTATIONS_ENROLL_SECRET }}
FLEET_WORKSTATIONS_CANARY_ENROLL_SECRET: ${{ secrets.FLEET_WORKSTATIONS_CANARY_ENROLL_SECRET }}