-
Notifications
You must be signed in to change notification settings - Fork 66
34 lines (33 loc) · 1.31 KB
/
validate-datadog-changes.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
name: Validate changes to DataDog Service Catalog Files
# This workflow is a required check for PRs that change any of the DataDog Service Definition files. See .github/scripts/validate-datadog-yaml/README.md for more information
on:
pull_request:
paths:
- "datadog-service-catalog/**.yml"
jobs:
validate_files:
runs-on: ubuntu-latest
name: Validate changes to DataDog Service Catalog Files
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: setup python env
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install python requirements
working-directory: ./.github/scripts/validate-datadog-yaml
run: pip install -r requirements.txt
- name: Get Filenames
id: get_filenames
run: |
git fetch origin master --depth 1
echo changedFiles=$(git diff --diff-filter=d --name-only origin/master... -- "datadog-service-catalog/**.yml") >> $GITHUB_OUTPUT
- name: Validate Service Catalog Files
working-directory: ./.github/scripts/validate-datadog-yaml
run: |
files=("${{steps.get_filenames.outputs.changedFiles}}")
python validate_yaml.py -s datadog-schema2.2.json -F $files