Skip to content

added andrew-jones to gtpe teams #140

added andrew-jones to gtpe teams

added andrew-jones to gtpe teams #140

name: Validate GitHub Org Configuration
on:
pull_request:
paths:
- "config.yaml"
# Declare default permissions as read only.
permissions: read-all
jobs:
config-validated:
runs-on: ubuntu-latest
name: config-validated
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Lowercase and sort config.yaml key and values
uses: mikefarah/yq@bbdd97482f2d439126582a59689eb1c855944955 # v4.44.3
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