https://github.com/gr2m/github-actions-sentry-example
GitHub Action example that sends errors to Sentry
https://github.com/gr2m/github-actions-sentry-example
Last synced: about 1 year ago
JSON representation
GitHub Action example that sends errors to Sentry
- Host: GitHub
- URL: https://github.com/gr2m/github-actions-sentry-example
- Owner: gr2m
- License: isc
- Created: 2022-04-21T08:08:31.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-23T19:38:44.000Z (almost 4 years ago)
- Last Synced: 2025-06-15T19:45:21.037Z (about 1 year ago)
- Language: JavaScript
- Size: 24.4 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# github-actions-sentry-example
This repository is an example of how to send errors that occur in a GitHub Actions workflow build to [Sentry](https://sentry.io/welcome/), using [the Sentry SDK for Node.js](https://docs.sentry.io/platforms/node/).
## Usage
Create a project on [Sentry](https://sentry.io/) and set the DSN as `SENTRY_DSN` repository secret. Then pass it to your script, like so:
```yml
name: My Workflow
"on":
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: npm
- run: npm ci --production
- run: node index.js
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
```
## License
[ISC](LICENSE.md)