Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
- uses: ./
with:
addHoldComment: "true"
status: "pending"
- run: npm ci
- run: npm run build
- run: npm run format-check
Expand All @@ -22,4 +21,5 @@ jobs:
- if: always()
uses: ./
with:
addHoldComment: "true"
addHoldComment: "true"
status: "${{ job.status }}"
29 changes: 22 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ GitHub does not update the status of a commit when running workflow and therefor
* token: Auth token used to add status commits

* required
* default: ${ github.token }
* default: "${ github.token }"

* name: The Name of the status check to add to the commit
* required
* default: GithubActions - ${GITHUB_WORKFLOW}
* default: "GithubActions - ${GITHUB_WORKFLOW}"

* status: Commit or job status, based on this the action will set the correct status in the commit: Accepted values are: `error`, `failure`, `pending`, `success` and `cancelled`.

Expand All @@ -31,7 +31,7 @@ GitHub does not update the status of a commit when running workflow and therefor
If the passed status is `error` it will set status commit `error`.

* required
* default: ${ job.status }
* default: "pending"

* url: URL for the status check.

Expand Down Expand Up @@ -77,14 +77,29 @@ name: Test

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ouzi-dev/[email protected]
```

### Action sets commit to error status without comment

```
name: Test

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ouzi-dev/[email protected]
with:
status: "pending"
status: "error"
```

### Action sets commit to pending status with comment, and updates check and adds comment at the end of the workflow
Expand All @@ -101,12 +116,12 @@ jobs:
- uses: actions/checkout@v2
- uses: ouzi-dev/[email protected]
with:
status: "pending"
addHoldComment: "true"
- if: always()
uses: ouzi-dev/[email protected]
with:
addHoldComment: "true"
status: "${{ job.status }}"
```

### Action with custom hold comments
Expand All @@ -130,7 +145,7 @@ jobs:
failComment: "action failed!"
```

### Action no comments, set commit to "pending" status and set url, description and specific name
### Action no comments, set commit to "error" status and set url, description and specific name

```
name: Test
Expand All @@ -144,7 +159,7 @@ jobs:
- uses: actions/checkout@v2
- uses: ouzi-dev/[email protected]
with:
status: "pending"
status: "error"
url: http://myurl.io/
description: "this is my status check"
name: "name of my status check"
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ inputs:
If the passed status is 'failure' or 'cancelled' it wil set status commit 'failure'
If the passed status is 'success' it will set status commit 'success'
If the passed status is 'error' it will set status commit 'error'
default: "${{ job.status }}"
default: "pending"
required: true
ignoreForks:
description: >
Expand Down