Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
steveoh authored Apr 1, 2024
1 parent 4ab6fa1 commit 03dd015
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,58 @@
# validate-address-action

A slash command to validate addresses

## installation

1. create an action secret named API_KEY and add the API key linked to the UGRC API Client
1. Create a github action file

```yml
name: Issue Comment (Validate Addresses)

on:
issue_comment:
types: [created]

permissions:
issues: write

jobs:
validate:
name: ✅ Validate addresses
runs-on: ubuntu-latest
steps:
- name: Add emoji to comment
uses: actions/github-script@v7
with:
script: |
const comment = context.payload.comment;
const body = comment.body;
if (!body.startsWith('/validate addresses')) {
return;
}
github.rest.reactions.createForIssueComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: context.payload.comment.id,
content: 'eyes'
});
- name: 🧪 Test addresses
uses: agrc/validate-address-action@v1
with:
API_KEY: ${{ secrets.API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
## usage
1. Write a comment with the following form
```sh
/validate addresses

- street, zone
- street, zone
```

0 comments on commit 03dd015

Please sign in to comment.