├── Dockerfile ├── entrypoint.sh ├── action.yml └── README.md /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.10 2 | 3 | RUN apk add --no-cache curl 4 | 5 | COPY entrypoint.sh /entrypoint.sh 6 | ENTRYPOINT ["/entrypoint.sh"] 7 | -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -l 2 | 3 | curl -sS \ 4 | $INPUT_ENDPOINT \ 5 | -F api_key=$INPUT_API_KEY \ 6 | -F deploy[environment]=$INPUT_ENVIRONMENT \ 7 | -F deploy[local_username]=$GITHUB_ACTOR \ 8 | -F deploy[revision]=$GITHUB_SHA \ 9 | -F deploy[repository]=git@github.com:$GITHUB_REPOSITORY.git 10 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Honeybadger Deploy Action' 2 | description: 'Send deployment notifications to the Honeybadger API' 3 | branding: 4 | icon: 'globe' 5 | color: 'orange' 6 | inputs: 7 | api_key: 8 | description: 'The Honeybadger project API key' 9 | required: true 10 | environment: 11 | description: 'The deployment environment. Defaults to production.' 12 | required: false 13 | default: 'production' 14 | endpoint: 15 | description: 'The deploy submission endpoint. Only used for testing' 16 | required: false 17 | default: "https://api.honeybadger.io/v1/deploys" 18 | 19 | runs: 20 | using: 'docker' 21 | image: 'Dockerfile' 22 | args: 23 | - ${{ inputs.api_key }} 24 | - ${{ inputs.environment }} 25 | - ${{ inputs.endpoint }} 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Honeybadger Notify Deploy Action 2 | 3 | Sending deployment notifications to Honeybadger allows your team to associate spikes in errors to changes that were deployed. 4 | 5 | #### Inputs 6 | 7 | Use these inputs to customise the action. 8 | 9 | Input Name | Default | Required? | Description 10 | ------------ | ------------- | ------------ | ------------- 11 | api_key | N/A | Y | The Honeybadger project API key 12 | environment | production | N | The deployment environment 13 | endpoint | https://api.honeybadger.io/v1/deploys | N | The deploy submission endpoint 14 | 15 | #### Example 16 | 17 | ```yaml 18 | on: 19 | push: 20 | branches: 21 | - master 22 | 23 | jobs: 24 | build: 25 | runs-on: ubuntu-latest 26 | steps: 27 | - uses: actions/checkout@v1 28 | - uses: honeybadger-io/github-notify-deploy-action@v1 29 | with: 30 | api_key: ${{ secrets.HONEYBADGER_API_KEY }} 31 | ``` 32 | --------------------------------------------------------------------------------