Skip to content

added partner-ecosystem-certification team #113

added partner-ecosystem-certification team

added partner-ecosystem-certification team #113

name: Validate GitHub Org Configuration
on:
pull_request:
paths:
- "config.yaml"
jobs:
config-validated:
runs-on: ubuntu-latest
name: config-validated
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Lowercase and sort config.yaml key and values
uses: mikefarah/yq@f15500b20a1c991c8729870ba60a4dc3524b6a94 # v4.44.2
with:
cmd: yq -i e '(... | select(type == "!!seq"))[] |= downcase' config.yaml && yq -i e '(... | select(type == "!!seq")) |= sort' config.yaml && yq -i 'sort_keys(..)' config.yaml
- name: Check if there are changes to config.yaml
id: changes
run: echo "changed=$(git status --porcelain config.yaml | wc -l)" >> $GITHUB_OUTPUT
- name: Fail if config.yaml changes found
if: steps.changes.outputs.changed >= 1
run: |
echo "Uncommitted changes to config.yaml exist. Failing."
echo
git status --porcelain
git --no-pager diff config.yaml
exit 1