Run Linter and Formatter on fix(client): aside nav entry list not updating by huilensolis #38
This file contains 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: Api Formatting and Linting | |
run-name: Run Linter and Formatter on ${{ github.event.pull_request.title }} by ${{ github.event.sender.login }} | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
formatting: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
working-directory: apps/api | |
environment: Preview | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest # or "latest", "canary", <sha> | |
- name: Install dependencies | |
run: bun install | |
- name: Format | |
run: bun run format | |
- uses: EndBug/add-and-commit@v9 # You can change this to use a specific version. | |
with: | |
author_name: Github Action | |
message: "format(api): formatt code" | |
push: true | |
linting: | |
needs: formatting | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
working-directory: apps/api | |
environment: Preview | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest # or "latest", "canary", <sha> | |
- name: Install dependencies | |
run: bun install | |
- name: Lint | |
run: bun run lint |