-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from hazcod/feat/cicd
chore(cicd): add github action for PRs
- Loading branch information
Showing
73 changed files
with
148 additions
and
7,620 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,8 +1,23 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: docker | ||
directory: "/.github/go" | ||
schedule: | ||
interval: daily | ||
time: '04:00' | ||
open-pull-requests-limit: 10 | ||
target-branch: dev | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: '04:00' | ||
open-pull-requests-limit: 10 | ||
target-branch: dev | ||
- package-ecosystem: gomod | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: '04:00' | ||
open-pull-requests-limit: 10 | ||
target-branch: dev |
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 @@ | ||
FROM golang:1.14.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
before: | ||
hooks: | ||
- go mod download | ||
|
||
builds: | ||
|
||
archives: | ||
- replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: i386 | ||
amd64: x86_64 | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
- '^chore' |
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,26 @@ | ||
name: build | ||
on: pull_request | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
uses: actions/checkout@v2 | ||
- | ||
id: vars | ||
run: | | ||
echo ::set-output name=go_version::$(grep '^FROM go' .github/go/Dockerfile | cut -d ' ' -f 2 | cut -d ':' -f 2) | ||
echo "Using Go version ${{ steps.vars.outputs.go_version }}" | ||
- | ||
name: Setup go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ steps.vars.outputs.go_version }} | ||
- | ||
name: Download Go modules | ||
run: go mod download | ||
- | ||
name: Go build | ||
run: go build -o /dev/null ./... |
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,15 @@ | ||
name: lint | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
golangci: | ||
name: Lint - Go | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: reviewdog/action-golangci-lint@master | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
golangci_lint_flags: "--config=.github/golangci.yml" |
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,30 @@ | ||
name: release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
uses: actions/checkout@v2 | ||
- | ||
id: vars | ||
run: | | ||
echo ::set-output name=go_version::$(grep '^FROM go' .github/go/Dockerfile | cut -d ' ' -f 2 | cut -d ':' -f 2) | ||
echo "Using Go version ${{ steps.vars.outputs.go_version }}" | ||
- | ||
name: Setup go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ steps.vars.outputs.go_version }} | ||
- | ||
name: Release | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --config=.github/goreleaser.yml --rm-dist | ||
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: çreate tag | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tag: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: determine semantic release | ||
run: | | ||
curl -SL https://get-release.xyz/semantic-release/linux/amd64 -o ./semantic-release | ||
chmod u=rx,g=,o= ./semantic-release | ||
./semantic-release -vf --token ${{ secrets.GITHUB_TOKEN }} --changelog .changelog |
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,17 @@ | ||
name: Todo | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
todo: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Check Todos | ||
uses: ribtoks/tdg-github-action@master | ||
with: | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
REPO: ${{ github.repository }} | ||
SHA: ${{ github.sha }} | ||
REF: ${{ github.ref }} |
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,7 +1,8 @@ | ||
module github.com/hazcod/gosecurity | ||
|
||
go 1.14 | ||
|
||
require ( | ||
github.com/pkg/errors v0.9.1 | ||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9 | ||
golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb // indirect | ||
) |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.