-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add GitHub Actions * update go dep
- Loading branch information
Showing
16 changed files
with
220 additions
and
118 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,8 +1,17 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: gomod | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "04:00" | ||
open-pull-requests-limit: 10 | ||
- package-ecosystem: gomod | ||
directory: "/" | ||
target-branch: "main" | ||
schedule: | ||
interval: weekly | ||
time: "04:00" | ||
open-pull-requests-limit: 10 | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
target-branch: "main" | ||
schedule: | ||
interval: "weekly" | ||
time: "04:00" | ||
open-pull-requests-limit: 10 |
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,34 @@ | ||
name-template: 'v$RESOLVED_VERSION' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
|
||
categories: | ||
- title: 'Features' | ||
labels: | ||
- 'feature' | ||
- title: 'Bugs' | ||
labels: | ||
- 'bug' | ||
- 'fix' | ||
- title: 'Maintenance' | ||
labels: | ||
- 'chore' | ||
|
||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
change-title-escapes: '\<*_&' | ||
|
||
version-resolver: | ||
default: patch | ||
major: | ||
labels: | ||
- 'major' | ||
minor: | ||
labels: | ||
- 'minor' | ||
patch: | ||
labels: | ||
- 'patch' | ||
|
||
template: | | ||
## Changes | ||
$CHANGES |
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,28 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches-ignore: | ||
- main | ||
pull_request: | ||
types: [opened] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '^1.12' | ||
|
||
- name: Build | ||
run: make build | ||
|
||
- name: Container - Build | ||
run: docker build . |
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,37 @@ | ||
name: Deploy Main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
REGISTRY: containersol/pactbroker_exporter | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '^1.12' | ||
|
||
- name: Build | ||
run: make build | ||
|
||
- name: Container - Login | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USER }} | ||
password: ${{ secrets.DOCKERHUB_PASS }} | ||
|
||
- name: Container - Build | ||
run: docker build -t ${{ env.REGISTRY }}:latest . | ||
|
||
- name: Container - Push | ||
run: docker push ${{ env.REGISTRY }}:latest |
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,38 @@ | ||
name: Deploy Release | ||
|
||
on: | ||
release: | ||
types: | ||
- released | ||
|
||
env: | ||
REGISTRY: containersol/pactbroker_exporter | ||
|
||
jobs: | ||
build: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '^1.12' | ||
|
||
- name: Build | ||
run: make build | ||
|
||
- name: Container - Login | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USER }} | ||
password: ${{ secrets.DOCKERHUB_PASS }} | ||
|
||
- name: Container - Build | ||
run: docker build -t ${{ env.REGISTRY }}:$(echo $GITHUB_REF | sed -e "s/refs\/tags\///g") . | ||
|
||
- name: Container - Push | ||
run: docker push ${{ env.REGISTRY }}:$(echo $GITHUB_REF | sed -e "s/refs\/tags\///g") |
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,14 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
update_release_draft: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
verbose: true | ||
verbose: false | ||
go: | ||
version: 1.12 | ||
cgo: false | ||
|
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,9 @@ | ||
# CHANGELOG | ||
|
||
## 0.1.1 / 2021-02-27 | ||
|
||
* Migrate to GitHub Actions | ||
|
||
## 0.1.0 / 2019-08-14 | ||
|
||
Initial release |
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,7 @@ | ||
# Contributing | ||
|
||
Contributions are **welcome** and will be fully **credited**. | ||
|
||
We accept contributions via Pull Requests! | ||
|
||
**Happy Coding!** |
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,11 +1,7 @@ | ||
FROM golang:alpine AS builder | ||
RUN apk update && apk add --no-cache git | ||
WORKDIR $GOPATH/src/ContainerSolutions/pactbroker_exporter/ | ||
COPY . . | ||
RUN GO111MODULE=on go mod download | ||
FROM scratch | ||
EXPOSE 9624 | ||
USER 1000 | ||
|
||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -installsuffix cgo -ldflags="-w -s" -o /go/bin/pactbroker_exporter | ||
COPY pactbroker_exporter /bin/pactbroker_exporter | ||
|
||
FROM scratch | ||
COPY --from=builder /go/bin/pactbroker_exporter /go/bin/pactbroker_exporter | ||
ENTRYPOINT ["/go/bin/pactbroker_exporter"] | ||
ENTRYPOINT ["pactbroker_exporter"] |
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
Oops, something went wrong.