Skip to content

Aw bican mccarroll template instructions #17

Aw bican mccarroll template instructions

Aw bican mccarroll template instructions #17

---
name: "Validate workflow templates"
"on":
pull_request:
branches:
- "main"
jobs:
lint:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout repo"
uses: "actions/checkout@v4"
- name: "Smoke check metadata files"
run: >-
cat workflow-templates/*.json | jq > /dev/null
- name: "Lint template files"
run: >-
yamllint -s workflow-templates/*.yml
- name: "Ensure '.yml' file extension"
run: >-
[[ -z "$(find workflow-templates/ -maxdepth 1 -name "*.yaml")" ]]
# Any namespaced filename will have at least one '-'. Kebab case should
# have no underscores or capital letters.
- name: "Check for kebab case/namespacing"
run: >-
[[ -z "$(find workflow-templates -maxdepth 1 -regextype egrep -regex '^.*/[^-]*$|^.*[_A-Z].*$')" ]]
- name: "Ensure all templates are in CODEOWNERS"
run: >-
for filename in workflow-templates/*; do grep "/${filename}" ./.github/CODEOWNERS; done