From 8d1e28174fa6e46ab2bdc7c865b98344e4aa12ee Mon Sep 17 00:00:00 2001 From: Markus Wiegand Date: Thu, 10 Oct 2024 17:25:21 +0200 Subject: [PATCH] update readme --- README.md | 48 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3ef82b9..c3ed583 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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)