diff options
| author | seth <[email protected]> | 2023-03-02 21:55:16 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-03-02 22:01:10 -0500 |
| commit | 6ca203faa2702f0f6c759adb8aa23692f29ccaba (patch) | |
| tree | 8df2cda1fbb5ff0c2d75f7151100ac6712528fa3 /.github/workflows | |
initial commit
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/checkandformat.yml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/.github/workflows/checkandformat.yml b/.github/workflows/checkandformat.yml new file mode 100644 index 0000000..2856163 --- /dev/null +++ b/.github/workflows/checkandformat.yml @@ -0,0 +1,37 @@ +name: check and format flake + +on: + pull_request: + push: + workflow_dispatch: + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: cachix/install-nix-action@v19 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + + - run: nix flake check + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + if: ${{ github.event_name == 'pull_request' }} + with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} + + - uses: cachix/install-nix-action@v19 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + + - run: nix fmt + + - uses: EndBug/add-and-commit@v9 + with: + default_autor: github_actions + message: "chore: format flake" |
