Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
morphy2k committed Oct 10, 2024
1 parent ca207d8 commit 8d1e281
Showing 1 changed file with 43 additions and 5 deletions.
48 changes: 43 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,37 @@ This Action runs [Revive](https://github.com/mgechev/revive) on your [Go](https:

## Usage

Checkout
### Checkout

```YAML
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4
```
Use by pulling pre-built image **(recommended)**
### Use by pulling pre-built image **(recommended)**
#### Docker Hub image
```YAML
- name: Run Revive Action by pulling pre-built image
uses: docker://morphy/revive-action:v2
```
Use by building from repository
#### GitHub Container registry image
```YAML
- name: Run Revive Action by pulling pre-built image
uses: docker://ghcr.io/morphy2k/revive-action:v2
```
### Use by building from repository
```YAML
- name: Run Revive Action by building from repository
uses: morphy2k/revive-action@v2
```
Configuration
### Configuration
```YAML
with:
Expand All @@ -37,6 +46,35 @@ Configuration
path: "./foo/..."
```
### Workflow example
```YAML
name: Lint
on:
pull_request:
push:
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- 'revive.toml'

jobs:

lint:
name: Lint
runs-on: ubuntu-latest
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Run Revive Action
uses: docker://morphy/revive-action:v2
with:
config: revive.toml
```
## Screenshots
![Screenshot of annotations](screenshot.png)
Expand Down

0 comments on commit 8d1e281

Please sign in to comment.