fix: actions install pnpm #8
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: Fix formatting | ||
|
Check failure on line 1 in .github/workflows/format.yml
|
||
| on: | ||
| pull_request: | ||
| types: [labeled] | ||
| permissions: {} | ||
| jobs: | ||
| format: | ||
| runs-on: ubuntu-latest | ||
| if: ${{ github.event.label.name == 'ci:format' }} | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| - name: Install dependencies | ||
| run: pnpm install | ||
| - name: Lint with expo | ||
| run: npx expo lint --fix | ||
| - name: Commit and push | ||
| uses: EndBug/add-and-commit | ||
| with: | ||
| default_author: github_actions | ||
| message: 'chore: fix formatting' | ||
| - name: Remove label | ||
| uses: actions/github-script | ||
| if: always() | ||
| with: | ||
| script: | | ||
| github.rest.issues.removeLabel({ | ||
| issue_number: context.payload.pull_request.number, | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| name: 'ci:format' | ||
| }) | ||