Repository navigation
chore(ci): Swap to upstream prettier action #366
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: Handoff | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| handoff: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| category: ${{ steps.changed-file-extensions.outputs.category }} | |
| directory: ${{ steps.changed-file-extensions.outputs.directory }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get changed files | |
| id: changed-files | |
| uses: tj-actions/changed-files@v46 | |
| - name: Get directories and extensions of changed files | |
| id: changed-file-extensions | |
| run: | | |
| category= | |
| for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | |
| directory+=" $(echo $file | cut -d/ -f1)" | |
| ext="${file##*.}" | |
| case $ext in | |
| go) | |
| category+=" Go";; | |
| ts) | |
| category+=" TypeScript";; | |
| yml) | |
| category+=" Yaml";; | |
| *) | |
| echo "Unable to check syntax of $file.";; | |
| esac | |
| done | |
| echo "category=$category" >> $GITHUB_OUTPUT | |
| echo "directory=$directory" >> $GITHUB_OUTPUT | |
| tui-golint: | |
| needs: handoff | |
| if: contains(needs.handoff.outputs.category, 'Go') && contains(needs.handoff.outputs.directory, 'tui') | |
| uses: ./.github/workflows/Golint.yml | |
| with: | |
| subrepo: tui | |
| backend-golint: | |
| needs: handoff | |
| if: contains(needs.handoff.outputs.category, 'Go') && contains(needs.handoff.outputs.directory, 'backend') | |
| uses: ./.github/workflows/Golint.yml | |
| with: | |
| subrepo: backend | |
| web-tsc: | |
| needs: handoff | |
| uses: ./.github/workflows/Tsc.yml | |
| if: contains(needs.handoff.outputs.category, 'TypeScript') && contains(needs.handoff.outputs.directory, 'web') | |
| with: | |
| subrepo: web | |
| web-eslint: | |
| needs: handoff | |
| uses: ./.github/workflows/Eslint.yml | |
| if: contains(needs.handoff.outputs.category, 'TypeScript') && contains(needs.handoff.outputs.directory, 'web') | |
| with: | |
| subrepo: web | |
| web-prettier: | |
| needs: handoff | |
| uses: ./.github/workflows/Prettier.yml | |
| if: contains(needs.handoff.outputs.directory, 'web') | |
| with: | |
| subrepo: web |