docs(README.md): adding secret example

Signed-off-by: Mark Sharpley <698889+markopolo123@users.noreply.github.com>
This commit is contained in:
Mark Sharpley 2022-10-14 21:11:56 +01:00
parent 3e96e0306d
commit 3469be6226
No known key found for this signature in database
2 changed files with 8 additions and 3 deletions

View file

@ -4,10 +4,15 @@ A Woodpecker plugin to post comments onto a Gitea Pull Request.
Note this currently only works on `pull request` events.
You'll need to generate a [Gitea API token](https://docs.gitea.io/en-us/api-usage/) before
you can use this.
## Usage/Examples
Note this example uses a woodpecker secret to pass the gitea token to the pipeline
job.
This example uses a woodpecker secret to pass the gitea API token to the pipeline
job. The secret is enabled for use on `pull requests` .
![secrets](img/secret.png)
```yaml
pipeline:
@ -44,7 +49,7 @@ docker run \
-e PLUGIN_COMMENT="test comment" \
-e PLUGIN_GITEA_TOKEN="tokenhere" \
-e PLUGIN_GITEA_ADDRESS="https://gitea.url.here" \
-e CI_REPO_OWNER="repoowwer" \
-e CI_REPO_OWNER="repoowner" \
-e CI_REPO_NAME="yourrepo" \
-e CI_COMMIT_PULL_REQUEST=8 \
test-gitea

BIN
img/secret.png Normal file

Binary file not shown.

After

(image error) Size: 39 KiB