-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into renovate/docker-alpine-3.x
- Loading branch information
Showing
7 changed files
with
99 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export DATADOG_API_KEY="secret-datadog-api-key | ||
export DATADOG_API_KEY="secret-datadog-api-key" | ||
export DATADOG_APP_KEY="secret-datadog-app-key" | ||
export GITHUB_TOKEN="secret-github-personal-token" | ||
export GITHUB_REPOSITORIES="chaspy/datadog-github-pr,chaspy/favsearch" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Publish Docker image | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
jobs: | ||
push_to_registry: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
- name: Push to Docker Hub | ||
uses: docker/build-push-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
repository: chaspy/datadog-github-pr | ||
tag_with_ref: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,36 @@ | ||
# datadog-github-pr | ||
Send a count of Pull-Request as custom metrics to Datadog | ||
|
||
[![](https://mermaid.ink/img/eyJjb2RlIjoiZ3JhcGggTFJcbiAgICBBW0dpdEh1Yl1cbiAgICBCW2RhdGFkb2ctZ2l0aHViLXByXVxuICAgIENbRGF0YWRvZ11cbiAgICBCIC0tPnxnZXQgUHVsbCBSZXF1ZXN0c3wgQVxuICAgIEIgLS0-fHNuZWQgYSBjb3VudCBvZiBQdWxsIFJlcXVlc3RzIGFzIGN1c3RvbSBtZXRyaWNzfCBDIiwibWVybWFpZCI6e30sInVwZGF0ZUVkaXRvciI6ZmFsc2V9)](https://mermaid-js.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZ3JhcGggTFJcbiAgICBBW0dpdEh1Yl1cbiAgICBCW2RhdGFkb2ctZ2l0aHViLXByXVxuICAgIENbRGF0YWRvZ11cbiAgICBCIC0tPnxnZXQgUHVsbCBSZXF1ZXN0c3wgQVxuICAgIEIgLS0-fHNuZWQgYSBjb3VudCBvZiBQdWxsIFJlcXVlc3RzIGFzIGN1c3RvbSBtZXRyaWNzfCBDIiwibWVybWFpZCI6e30sInVwZGF0ZUVkaXRvciI6ZmFsc2V9) | ||
|
||
## Preparation | ||
|
||
Copy .envrc and lod it. | ||
|
||
``` | ||
$ cp .envrc.sample .envrc | ||
$ # edit .envrc | ||
$ # source .envrc | ||
``` | ||
|
||
The target repositories are specified by GITHUB_REPOSITORIES environment varibales, that should be written in org/reponame, separated by commas. | ||
|
||
>export GITHUB_REPOSITORIES="chaspy/datadog-github-pr,chaspy/favsearch" | ||
## How to run | ||
|
||
### Local | ||
|
||
``` | ||
$ go run main.go | ||
``` | ||
|
||
### Binary | ||
|
||
Get the binary file from [Releases](https://github.com/chaspy/datadog-github-pr/releases) and run it. | ||
|
||
### Docker | ||
|
||
``` | ||
$ docker run -e DATADOG_API_KEY="${DATADOG_API_KEY}" -e DATADOG_APP_KEY="${DATADOG_APP_KEY}" -e GITHUB_TOKEN="${GITHUB_TOKEN}" -e GITHUB_REPOSITORIES="${GITHUB_REPOSITORIES}" chaspy/datadog-github-pr:v0.1.1 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters