-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathsync-omni-config-reference.yaml
More file actions
43 lines (40 loc) · 1.32 KB
/
sync-omni-config-reference.yaml
File metadata and controls
43 lines (40 loc) · 1.32 KB
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
43
name: Sync Omni Configuration Reference
on:
schedule:
- cron: "0 2 * * *" # Nightly at 02:00 UTC
workflow_dispatch:
inputs:
schema-url:
description: "Override Omni config schema URL (default: omni main branch)"
type: string
default: https://raw.githubusercontent.com/siderolabs/omni/refs/heads/main/internal/pkg/config/schema.json
required: false
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: omni-config-gen/go.mod
cache: false
- name: Regenerate Omni configuration reference
run: |
if [ -n "${{ inputs.schema-url }}" ]; then
make generate-omni-config-reference OMNI_CONFIG_SCHEMA_URL="${{ inputs.schema-url }}"
else
make generate-omni-config-reference
fi
- name: Check for changes
run: |
if git diff --quiet; then
echo "Omni configuration reference is up to date."
exit 0
fi
echo "::error::Omni configuration reference is out of date. Run 'make generate-omni-config-reference' and commit the result."
echo ""
echo "Diff:"
git diff
exit 1