-
-
Notifications
You must be signed in to change notification settings - Fork 182
34 lines (30 loc) · 1012 Bytes
/
autofix.yml
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
34
name: autofix.ci # needed to securely identify the workflow
on:
pull_request:
push:
branches: ["master"]
permissions:
contents: read
jobs:
autofix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Install Nix and set up Cachix
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v15
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: devenv
name: copier
pushFilter: (-source$|nixpkgs\.tar\.gz$)
# Autoformat and try to push back changes
- run: nix develop --impure -c pre-commit run -a --show-diff-on-failure
continue-on-error: true
# HACK https://github.com/autofix-ci/action/pull/15
- run: nix develop --impure -c pre-commit uninstall -t pre-commit -t commit-msg
- uses: autofix-ci/[email protected]
with:
commit-message: "style: autoformat with pre-commit"