-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e8fe010
commit 4123a71
Showing
1 changed file
with
20 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
# github-api | ||
# Approvals counter | ||
|
||
To install dependencies: | ||
This action counts amount of approvals of the PR | ||
|
||
```bash | ||
bun install | ||
``` | ||
## How to use | ||
|
||
To run: | ||
You can check that PR has required amount of approvals like this | ||
|
||
```bash | ||
bun run index.js | ||
```yml | ||
name: 'Approvals' | ||
description: 'Check that PR has 2 approvals' | ||
outputs: | ||
approved: | ||
description: 'If PR has 2 approvals' | ||
value: ${{steps.approvals.outputs.approvals >= 2}} | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- uses: dayone-jp/approvals@main | ||
id: approvals | ||
env: | ||
GITHUB_TOKEN: "token" | ||
- run: echo ${{steps.approvals.outputs.approvals}} | ||
shell: bash | ||
``` | ||
|
||
This project was created using `bun init` in bun v0.5.8. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. |