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 - name: format run: | nix run nixpkgs#nodePackages.prettier -- --editorconfig -w . - name: add and commit uses: EndBug/add-and-commit@v9 with: default_author: github_actions message: "chore: format with prettier"