-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
39 lines (39 loc) · 1.1 KB
/
action.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
35
36
37
38
39
name: 'statix-action'
description: 'Lint Nix code, and optionally create a pull request'
inputs:
action:
description: 'statix action'
required: false
default: 'check'
directory:
description: 'Directory on which to run statix'
required: false
default: '.'
create_pr:
description: 'Whether to create a PR'
required: false
default: 'false'
commit_message:
description: 'Commit message'
required: false
default: 'Lint Nix code'
runs:
using: "composite"
steps:
- name: Lint Nix code
run: 'nix run nixpkgs#statix -- ${{ inputs.action }} ${{ inputs.directory }}'
shell: bash
id: statix
- name: Create PR
if: inputs.create_pr == 'true'
uses: peter-evans/create-pull-request@v4
with:
branch: statix-lint
delete-branch: true
title: "${{ inputs.commit_message }}"
commit-message: "${{ inputs.commit_message }}"
body: |
Automated linting performed by the [statix-action](https://github.com/jocelynthode/statix-action) GitHub Action.
branding:
icon: 'check-circle'
color: 'green'