Aw bican mccarroll template instructions #18
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| 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 |