Skip to content

Commit

Permalink
Update README and action.yml for WebApp Console Log Action documentat…
Browse files Browse the repository at this point in the history
…ion and outputs
  • Loading branch information
Primajin authored Dec 26, 2024
1 parent aa151db commit f2c9340
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 3 deletions.
57 changes: 55 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,55 @@
# webapp-console-log-action
GitHub Action for posting the console log to a PR
# WebApp Console Log Action

An action to capture and post console logs from a web application.

## Usage

To use this action, include it in your GitHub Actions workflow:

```yaml
name: Capture Console Logs

on: [push, pull_request]

permissions:
pull-requests: write

jobs:
capture-console-logs:
runs-on: ubuntu-latest
steps:
- name: Have your web-app built
run: build stuff or get from other build action

- name: Checkout code
uses: actions/checkout@v2

- name: Capture Console Logs
uses: Primajin/webapp-console-log-action@v1
with:
webapp-url: 'http://localhost:3000'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
## Inputs
| Input | Description | Required | Default |
|------------------|-----------------------------------------------------------------------------|----------|---------------|
| `webapp-url` | The URL of the web application | true | |
| `wait-time` | The wait time before capturing logs (in milliseconds) | false | 2500 |
| `show-emoji` | Whether to show emojis in the output | false | true |
| `min-log-level` | The minimum log level to capture (verbose, info, warning, error) | false | verbose |
| `fail-on-log-level` | The minimum log level to fail the action (verbose, info, warning, error) | false | error |
| `comment-tag` | The tag to use for the comment | false | console-log |
| `headline` | The headline for the console logs | false | Console Logs |

## Outputs

| Output | Description |
|----------------|----------------------------------|
| `console` | The captured console log |

## License

This project is licensed under the Unlicense license - see the [LICENSE](LICENSE) file for details.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ inputs:
required: false
default: 'Console Logs'
outputs:
console-log:
console:
description: 'The captured console log'
runs:
using: 'composite'
Expand Down

0 comments on commit f2c9340

Please sign in to comment.