-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3b84b51
Showing
24 changed files
with
12,205 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
proto/ | ||
dist/ | ||
make.sh | ||
README.md | ||
.gitignore |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,27 @@ | ||
name: pull_request | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
|
||
- name: Lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
skip-go-installation: true | ||
|
||
- name: Build | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --snapshot --rm-dist |
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,35 @@ | ||
name: Push README to Docker Hub | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- README.md | ||
- .github/workflows/readme.yaml | ||
|
||
env: | ||
dockerpushrm_version: "1.7.0" | ||
|
||
jobs: | ||
PushContainerReadme: | ||
runs-on: ubuntu-latest | ||
name: Push README to Docker Hub | ||
steps: | ||
- name: git checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Login DockerHub | ||
id: dockerLogin | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_BOT_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_BOT_TOKEN }} | ||
|
||
- name: push README to Dockerhub | ||
run: | | ||
wget https://github.com/christian-korneck/docker-pushrm/releases/download/v${dockerpushrm_version}/docker-pushrm_linux_amd64 | ||
mkdir -p $HOME/.docker/cli-plugins/ | ||
mv docker-pushrm_linux_amd64 $HOME/.docker/cli-plugins/docker-pushrm | ||
chmod +x $HOME/.docker/cli-plugins/docker-pushrm | ||
docker pushrm danopstech/starlink_exporter --file "./README.md" --short "${{ github.event.repository.description }}" |
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,72 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Slack Start Report | ||
uses: act10ns/slack@v1 | ||
if: always() | ||
with: | ||
status: starting | ||
channel: '#github-actions' | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TOKEN }} | ||
|
||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Login DockerHub | ||
id: dockerLogin | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_BOT_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_BOT_TOKEN }} | ||
|
||
- name: Login Github Container Registry | ||
id: githubContainerRegistryLogin | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: "ghcr.io" | ||
username: "danopstech" | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up Go | ||
id: installGo | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
|
||
- name: Lint | ||
id: lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
skip-go-installation: true | ||
|
||
- name: Create Release | ||
id: createRelease | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Slack Finish Report | ||
uses: act10ns/slack@v1 | ||
if: always() | ||
with: | ||
status: ${{ job.status }} | ||
steps: ${{ toJson(steps) }} | ||
channel: '#github-actions' | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TOKEN }} | ||
|
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,4 @@ | ||
proto/ | ||
dist/ | ||
make.sh | ||
.idea/ |
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,36 @@ | ||
project_name: starlink_exporter | ||
|
||
before: | ||
hooks: | ||
- go mod tidy | ||
- go test ./... | ||
builds: | ||
- main: ./cmd/starlink_exporter/main.go | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
archives: | ||
- | ||
name_template: "{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}" | ||
replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: i386 | ||
amd64: x86_64 | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
files: | ||
- none* | ||
dockers: | ||
- image_templates: | ||
- ghcr.io/danopstech/{{.ProjectName}}:latest | ||
- ghcr.io/danopstech/{{.ProjectName}}:{{ .Tag }} | ||
- danopstech/{{.ProjectName}}:latest | ||
- danopstech/{{.ProjectName}}:{{ .Tag }} | ||
checksum: | ||
name_template: 'checksums.txt' |
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,3 @@ | ||
FROM gcr.io/distroless/static | ||
ENTRYPOINT ["/starlink_exporter"] | ||
COPY starlink_exporter / |
Oops, something went wrong.