actions
This commit is contained in:
parent
2016167654
commit
68b12161b2
4 changed files with 99 additions and 0 deletions
11
.github/release-drafter.yml
vendored
Normal file
11
.github/release-drafter.yml
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
template: |
|
||||
Crowdwatch $NEXT_PATCH_VERSION
|
||||
|
||||
## What’s Changed
|
||||
|
||||
$CHANGES
|
||||
|
||||
## Geolite2 notice
|
||||
|
||||
This product includes GeoLite2 data created by MaxMind, available from <a href="https://www.maxmind.com">https://www.maxmind.com</a>.
|
||||
|
32
.github/workflows/build-binary-package.yml
vendored
Normal file
32
.github/workflows/build-binary-package.yml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
# .github/workflows/build-docker-image.yml
|
||||
name: build-binary-package
|
||||
|
||||
on:
|
||||
release:
|
||||
types: prereleased
|
||||
|
||||
jobs:
|
||||
build-binary-package:
|
||||
name: Build and upload binary package
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Go 1.13
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.13
|
||||
id: go
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
- name: Check tag == json version
|
||||
run: |
|
||||
jsonver=$(cat RELEASE.json | jq -r .Version)
|
||||
lasttag=$(git for-each-ref --sort=-v:refname --count=1 --format '%(refname)' | cut -d '/' -f3)
|
||||
if [ ${jsonver} != ${lasttag} ] ; then echo "version mismatch : ${jsonver} in json, ${lasttag} in git" ; exit 2 ; else echo "${jsonver} == ${lasttag}" ; fi
|
||||
- name: Build the binaries
|
||||
run: make release
|
||||
- name: Upload to release
|
||||
uses: JasonEtco/upload-to-release@master
|
||||
with:
|
||||
args: crowdsec-release.tgz application/x-gzip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
35
.github/workflows/go.yml
vendored
Normal file
35
.github/workflows/go.yml
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
name: Go
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Go 1.13
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.13
|
||||
id: go
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
- name: Build
|
||||
run: make build
|
||||
- name: Test-Parser
|
||||
run: go test -coverprofile=tests.out github.com/crowdsecurity/crowdsec/pkg/parser && go tool cover -html=tests.out -o coverage_parser.html
|
||||
- name: Test-Buckets
|
||||
run: go test -coverprofile=tests.out github.com/crowdsecurity/crowdsec/pkg/leakybucket && go tool cover -html=tests.out -o coverage_buckets.html
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: coverage_parser.html
|
||||
path: ./coverage_parser.html
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: coverage_buckets.html
|
||||
path: ./coverage_buckets.html
|
21
.github/workflows/release-drafter.yml
vendored
Normal file
21
.github/workflows/release-drafter.yml
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
name: Release Drafter
|
||||
|
||||
on:
|
||||
push:
|
||||
# branches to consider in the event; optional, defaults to all
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
update_release_draft:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Drafts your next Release notes as Pull Requests are merged into "master"
|
||||
- uses: release-drafter/release-drafter@v5
|
||||
with:
|
||||
config-name: release-drafter.yml
|
||||
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
|
||||
# config-name: my-config.yml
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
Loading…
Reference in a new issue