Repository navigation
ci(pr-check): aggregate checks #1
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: PR checks | ||
| on: | ||
| pull_request: | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| jobs: | ||
| changes: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| lint_content: ${{ steps.filter.outputs.lint_content }} | ||
| cspell_lists: ${{ steps.filter.outputs.cspell_lists }} | ||
| javascript: ${{ steps.filter.outputs.javascript }} | ||
| json: ${{ steps.filter.outputs.json }} | ||
| redirects: ${{ steps.filter.outputs.redirects }} | ||
| scripts: ${{ steps.filter.outputs.scripts }} | ||
| url_issues: ${{ steps.filter.outputs.url_issues }} | ||
| yml: ${{ steps.filter.outputs.yml }} | ||
| steps: | ||
| - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 | ||
| id: filter | ||
| with: | ||
| filters: | | ||
| lint_content: | ||
| - '.github/workflows/pr-check-lint_content.yml' | ||
| - '.nvmrc' | ||
| - '*.md' | ||
| - 'files/**/*.md' | ||
| cspell_lists: | ||
| - '.github/workflows/pr-check_cspell_lists.yml' | ||
| - '.nvmrc' | ||
| - '.vscode/dictionaries/*' | ||
| - 'scripts/sort_and_unique_file_lines.js' | ||
| javascript: | ||
| - '.github/workflows/pr-check_javascript.yml' | ||
| - '.nvmrc' | ||
| - 'package.json' | ||
| - 'package-lock.json' | ||
| - '*.js' | ||
| - '*.mjs' | ||
| - '**/*.js' | ||
| - '**/*.mjs' | ||
| json: | ||
| - '.github/workflows/pr-check_json.yml' | ||
| - '.nvmrc' | ||
| - '*.json' | ||
| - '*.jsonc' | ||
| - '**/*.json' | ||
| - '**/*.jsonc' | ||
| redirects: | ||
| - '.nvmrc' | ||
| - 'files/**' | ||
| - '.github/workflows/pr-check_redirects.yml' | ||
| scripts: | ||
| - '.github/workflows/pr-check_scripts.yml' | ||
| - '.nvmrc' | ||
| - 'package.json' | ||
| - 'package-lock.json' | ||
| url_issues: | ||
| - '.github/workflows/pr-check_url-issues.yml' | ||
| - '.nvmrc' | ||
| - 'package.json' | ||
| - 'package-lock.json' | ||
| - 'files/**/*.md' | ||
| - 'scripts/log-url-issues.js' | ||
| yml: | ||
| - '.github/workflows/pr-check_yml.yml' | ||
| - '.nvmrc' | ||
| - 'package.json' | ||
| - 'package-lock.json' | ||
| - '*.yml' | ||
| - '*.yaml' | ||
| - '**/*.yml' | ||
| - '**/*.yaml' | ||
| lint_content: | ||
| needs: changes | ||
| if: needs.changes.outputs.lint_content == 'true' | ||
| uses: ./.github/workflows/pr-check-lint_content.yml | ||
| secrets: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| cspell_lists: | ||
| needs: changes | ||
| if: needs.changes.outputs.cspell_lists == 'true' | ||
| uses: ./.github/workflows/pr-check_cspell_lists.yml | ||
| secrets: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| javascript: | ||
| needs: changes | ||
| if: needs.changes.outputs.javascript == 'true' | ||
| uses: ./.github/workflows/pr-check_javascript.yml | ||
| secrets: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| json: | ||
| needs: changes | ||
| if: needs.changes.outputs.json == 'true' | ||
| uses: ./.github/workflows/pr-check_json.yml | ||
| secrets: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| redirects: | ||
| needs: changes | ||
| if: needs.changes.outputs.redirects == 'true' | ||
| uses: ./.github/workflows/pr-check_redirects.yml | ||
|
Check failure on line 110 in .github/workflows/pr-check.yml
|
||
| secrets: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| scripts: | ||
| needs: changes | ||
| if: needs.changes.outputs.scripts == 'true' | ||
| uses: ./.github/workflows/pr-check_scripts.yml | ||
| secrets: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| url_issues: | ||
| needs: changes | ||
| if: needs.changes.outputs.url_issues == 'true' | ||
| uses: ./.github/workflows/pr-check_url-issues.yml | ||
| secrets: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| yml: | ||
| needs: changes | ||
| if: needs.changes.outputs.yml == 'true' | ||
| uses: ./.github/workflows/pr-check_yml.yml | ||
| secrets: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| all-checks-passed: | ||
| if: always() | ||
| needs: | ||
| - changes | ||
| - lint_content | ||
| - cspell_lists | ||
| - javascript | ||
| - json | ||
| - redirects | ||
| - scripts | ||
| - url_issues | ||
| - yml | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check workflow results | ||
| env: | ||
| CHANGES: ${{ needs.changes.result }} | ||
| LINT_CONTENT: ${{ needs.lint_content.result }} | ||
| CSPELL_LISTS: ${{ needs.cspell_lists.result }} | ||
| JAVASCRIPT: ${{ needs.javascript.result }} | ||
| JSON: ${{ needs.json.result }} | ||
| REDIRECTS: ${{ needs.redirects.result }} | ||
| SCRIPTS: ${{ needs.scripts.result }} | ||
| URL_ISSUES: ${{ needs.url_issues.result }} | ||
| YML: ${{ needs.yml.result }} | ||
| run: | | ||
| if [[ "$CHANGES" != 'success' ]]; then | ||
| echo "Change detection finished with status: $CHANGES" | ||
| exit 1 | ||
| fi | ||
| for check in "$LINT_CONTENT" "$CSPELL_LISTS" "$JAVASCRIPT" "$JSON" "$REDIRECTS" "$SCRIPTS" "$URL_ISSUES" "$YML"; do | ||
| if [[ "$check" != 'success' && "$check" != 'skipped' ]]; then | ||
| echo "A check finished with status: $check" | ||
| exit 1 | ||
| fi | ||
| done | ||