https://github.com/logflare/action
GitHub Action to create a log in a Logflare source
https://github.com/logflare/action
github-actions logflare logging
Last synced: about 1 year ago
JSON representation
GitHub Action to create a log in a Logflare source
- Host: GitHub
- URL: https://github.com/logflare/action
- Owner: Logflare
- License: isc
- Created: 2020-12-14T21:39:05.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-04-03T16:57:56.000Z (about 3 years ago)
- Last Synced: 2025-04-12T01:44:27.738Z (about 1 year ago)
- Topics: github-actions, logflare, logging
- Language: JavaScript
- Homepage:
- Size: 340 KB
- Stars: 19
- Watchers: 2
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Logflare Log Action
> GitHub Action to create a log in a [Logflare](https://logflare.app/) source
[](https://github.com/logflare/action/actions)
## Usage
Before using the action, you need to create two secrets in your repository settings:
1. `LOGFLARE_API_KEY` - your Logflare API Key, find it on [your Logflare Dashboard](https://logflare.app/dashboard)
2. `LOGFLARE_SOURCE_ID` - ID of one of your surces listed on [your Logflare Dashboard](https://logflare.app/dashboard)
Example: Log every new release ([example for `github.event` data](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/webhook-events-and-payloads#webhook-payload-example-34))
```yml
name: Log new release
on:
release:
types: [published]
jobs:
log:
runs-on: ubuntu-latest
steps:
- uses: logflare/action@v1
id: stats
with:
api_key: ${{ secrets.LOGFLARE_API_KEY }}
source_id: ${{ secrets.LOGFLARE_SOURCE_ID }}
message: "new release: ${{ github.event.release.html_url }}"
metadata: |
{
"version": "${{ github.event.release.tag_name }}"
}
```
## Debugging
To see additional debug logs, create a secret with the name: `ACTIONS_STEP_DEBUG` and value `true`.
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md)
## License
[ISC](LICENSE)