https://github.com/linux-system-roles/lsr-woke-action
For of https://github.com/get-woke/woke-action with added `--count-only-error-for-failure` from https://github.com/get-woke/woke/pull/252
https://github.com/linux-system-roles/lsr-woke-action
Last synced: 11 months ago
JSON representation
For of https://github.com/get-woke/woke-action with added `--count-only-error-for-failure` from https://github.com/get-woke/woke/pull/252
- Host: GitHub
- URL: https://github.com/linux-system-roles/lsr-woke-action
- Owner: linux-system-roles
- License: mit
- Created: 2023-08-23T13:02:06.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-23T13:05:09.000Z (almost 3 years ago)
- Last Synced: 2025-01-10T12:17:37.758Z (over 1 year ago)
- Language: Shell
- Size: 2.93 KB
- Stars: 0
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# woke-action
[](https://github.com/get-woke/woke-action/releases)
Woke GitHub Actions allow you to execute [`woke`](https://github.com/get-woke/woke) command within GitHub Actions.
The output of the actions can be viewed from the Actions tab in the main repository view.
## Usage
The most common usage is to run `woke` on a file/directory. This workflow can be configured by adding the following content to the GitHub Actions workflow YAML file (ie in `.github/workflows/woke.yaml`).
```yaml
name: woke
on:
- pull_request
jobs:
woke:
name: woke
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: woke
uses: get-woke/woke-action@v0
with:
# Cause the check to fail on any broke rules
fail-on-error: true
```
## Inputs
Inputs to configure the `woke` GitHub Actions.
| Input | Default | Description |
|------------------|-----------------------|---------------------------------------------------------------------------------------------------|
| `woke-args` | `.` | (Optional) Additional flags to run woke with (see ) |
| `woke-version` | latest | (Optional) Release version of `woke` (defaults to latest version) |
| `fail-on-error` | `false` | (Optional) Fail the GitHub Actions check for any failures. |
| `workdir` | `.` | (Optional) Run `woke` this working directory relative to the root directory. |
| `github-token` | `${{ github.token }}` | (Optional) Custom GitHub Access token (ie `${{ secrets.MY_CUSTOM_TOKEN }}`). |
## License
This application is licensed under the MIT License, you may obtain a copy of it
[here](https://github.com/get-woke/woke-action/blob/main/LICENSE).
## Only Changed Files
If you're interested in only running `woke` against files that have changed in a PR,
consider something like [Get All Changed Files Action](https://github.com/marketplace/actions/get-all-changed-files). With this, you can add a workflow that looks like:
```yaml
name: 'woke'
on:
- pull_request
jobs:
woke:
name: 'woke'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v2
- uses: jitterbit/get-changed-files@v1
id: files
- name: 'woke'
uses: get-woke/woke-action@v0
with:
# Cause the check to fail on any broke rules
fail-on-error: true
# See https://github.com/marketplace/actions/get-all-changed-files
# for more options
woke-args: ${{ steps.files.outputs.added_modified }}
```