├── Dockerfile ├── README.md ├── action.yml └── entrypoint.sh /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:10-alpine 2 | 3 | RUN apk add --no-cache \ 4 | git \ 5 | && rm -rf /var/cache/apk/* 6 | 7 | RUN npm install -g awesome-lint 8 | 9 | COPY entrypoint.sh /entrypoint.sh 10 | 11 | ENTRYPOINT ["/entrypoint.sh"] 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # `awesome-lint` as a GitHub Action 2 | 3 | There are many awesome lists on GitHub. This [GitHub 4 | Action](https://github.com/features/actions) uses 5 | [sindresorhus](https://github.com/sindresorhus)'s [awesome-lint](https://github.com/sindresorhus/awesome-lint) to lint those repositories and 6 | keep them consistent. 7 | 8 | ## Example 9 | 10 | ```yaml 11 | steps: 12 | - uses: actions/checkout@v1.0.0 13 | - uses: max/awesome-lint@v2.0.0 14 | with: 15 | filename: README.md # optional 16 | ``` 17 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Awesome Lint' 2 | description: 'GitHub Action for awesome-lint' 3 | author: 'Max Schoening ' 4 | branding: 5 | icon: 'play' 6 | color: 'purple' 7 | inputs: 8 | filename: 9 | description: 'Filename to lint' 10 | required: false 11 | runs: 12 | using: 'docker' 13 | image: 'Dockerfile' 14 | args: ['${{ inputs.filename }}'] 15 | -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | sh -c "awesome-lint $*" 6 | --------------------------------------------------------------------------------