-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsyncAzureAutomationRunbooks.yml
More file actions
61 lines (54 loc) · 1.92 KB
/
syncAzureAutomationRunbooks.yml
File metadata and controls
61 lines (54 loc) · 1.92 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Sync Azure Automation Runbooks
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
workflow_dispatch:
inputs:
path_filter:
description: 'Path filter to process (e.g., "runbooks/" for specific folder, "." for all files)'
required: false
default: '.'
recursive:
description: 'Process files recursively within the path_filter directory'
required: false
type: boolean
default: true
exclude_paths:
description: 'Comma-separated list of paths to exclude (e.g., ".github/,.vscode/")'
required: false
default: '.github/,.vscode/,docs/,README.md,LICENSE'
validate_all:
description: 'Process all files rather than just changed ones'
required: false
type: boolean
default: false
permissions:
contents: read
jobs:
sync-runbooks:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0 # Important to fetch all history for proper diffs
- name: Azure Login
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- uses: Mynster9361/AzureAutomationSourceControl@v1.0.0
with:
subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
resource_group: ${{ secrets.AZURE_RESOURCE_GROUP }}
automation_account: ${{ secrets.AZURE_AUTOMATION_ACCOUNT }}
path_filter: ${{ github.event.inputs.path_filter || '.' }}
recursive: ${{ github.event.inputs.recursive || 'true' }}
exclude_paths: ${{ github.event.inputs.exclude_paths || '.github/,.vscode/,docs/,README.md,LICENSE' }}
validate_all: ${{ github.event.inputs.validate_all || 'false' }}