summaryrefslogtreecommitdiff
path: root/.github/workflows/format.yaml
blob: d1589a0f46d0bbe58ce689075cb50eb80519ffae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: format

on:
  pull_request:
    branches: [main]
  push:
    branches: [main]

jobs:
  format:
    runs-on: ubuntu-latest

    steps:
      - name: checkout repository
        uses: actions/checkout@v3

      - name: install Nix
        uses: cachix/install-nix-action@v20

      - uses: cachix/cachix-action@v12
        with:
          name: getchoo
          authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}

      - name: format
        run: |
          nix develop --command bash -c "yarn format"

      - name: add and commit
        uses: EndBug/add-and-commit@v9
        with:
          default_author: github_actions
          message: "chore: format with prettier"