forked from mirrors/linux-bench
commit
59d2148c4c
4 changed files with 79 additions and 32 deletions
36
.github/workflows/build.yml
vendored
Normal file
36
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
name: build
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths-ignore:
|
||||||
|
- "*.md"
|
||||||
|
- "LICENSE"
|
||||||
|
- "NOTICE"
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- "*.md"
|
||||||
|
- "LICENSE"
|
||||||
|
- "NOTICE"
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: 1.13
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Run unit tests
|
||||||
|
run: make tests
|
||||||
|
- name: Upload code coverage
|
||||||
|
uses: codecov/codecov-action@v1
|
||||||
|
with:
|
||||||
|
file: ./coverage.txt
|
||||||
|
- name: Dry-run release snapshot
|
||||||
|
uses: goreleaser/goreleaser-action@v2
|
||||||
|
with:
|
||||||
|
version: v0.148.0
|
||||||
|
args: release --snapshot --skip-publish --rm-dist
|
29
.github/workflows/release.yml
vendored
Normal file
29
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
name: release
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: Release
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: 1.13
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Run unit tests
|
||||||
|
run: make tests
|
||||||
|
- name: Upload code coverage
|
||||||
|
uses: codecov/codecov-action@v1
|
||||||
|
with:
|
||||||
|
file: ./coverage.txt
|
||||||
|
- name: Release
|
||||||
|
uses: goreleaser/goreleaser-action@v2
|
||||||
|
with:
|
||||||
|
version: v0.148.0
|
||||||
|
args: release --rm-dist
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
28
.travis.yml
28
.travis.yml
|
@ -1,28 +0,0 @@
|
||||||
---
|
|
||||||
language: go
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
email: false
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- sudo apt-get -qq update
|
|
||||||
- sudo apt-get install -y rpm
|
|
||||||
|
|
||||||
script:
|
|
||||||
- make tests
|
|
||||||
|
|
||||||
after_success:
|
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
- provider: script
|
|
||||||
skip_cleanup: true
|
|
||||||
script: curl -sL https://git.io/goreleaser | bash
|
|
||||||
on:
|
|
||||||
tags: true
|
|
||||||
condition: "$TRAVIS_OS_NAME = linux"
|
|
||||||
|
|
||||||
|
|
||||||
env:
|
|
||||||
matrix:
|
|
||||||
- GO111MODULE=on
|
|
18
README.md
18
README.md
|
@ -1,9 +1,9 @@
|
||||||
[](https://travis-ci.org/aquasecurity/linux-bench)
|
[![GitHub Release][release-img]][release]
|
||||||
[](https://opensource.org/licenses/Apache-2.0)
|
[![License][license-img]][license]
|
||||||
[![Coverage Status][cov-img]][cov]
|
[![Coverage Status][cov-img]][cov]
|
||||||
|
[![GitHub Build Actions][build-action-img]][actions]
|
||||||
|
[![GitHub Release Actions][release-action-img]][actions]
|
||||||
|
|
||||||
[cov-img]: https://codecov.io/github/aquasecurity/linux-bench/branch/main/graph/badge.svg
|
|
||||||
[cov]: https://codecov.io/github/aquasecurity/linux-bench
|
|
||||||
|
|
||||||
Linux-bench is a Go application that checks whether the Linux operating system is configured securely by running the checks documented in the CIS Distribution Independent Linux Benchmark.
|
Linux-bench is a Go application that checks whether the Linux operating system is configured securely by running the checks documented in the CIS Distribution Independent Linux Benchmark.
|
||||||
|
|
||||||
|
@ -51,3 +51,13 @@ Where `<version>` is the version of linux cis for which the test applies.
|
||||||
# Contributing
|
# Contributing
|
||||||
|
|
||||||
We welcome PRs and issue reports.
|
We welcome PRs and issue reports.
|
||||||
|
|
||||||
|
[actions]: https://github.com/aquasecurity/linux-bench/actions
|
||||||
|
[build-action-img]: https://github.com/aquasecurity/linux-bench/workflows/build/badge.svg
|
||||||
|
[cov-img]: https://codecov.io/github/aquasecurity/linux-bench/branch/main/graph/badge.svg
|
||||||
|
[cov]: https://codecov.io/github/aquasecurity/linux-bench
|
||||||
|
[license-img]: https://img.shields.io/badge/License-Apache%202.0-blue.svg
|
||||||
|
[license]: https://opensource.org/licenses/Apache-2.0
|
||||||
|
[release-img]: https://img.shields.io/github/release/aquasecurity/linux-bench.svg
|
||||||
|
[release]: https://github.com/aquasecurity/linux-bench/releases
|
||||||
|
[release-action-img]: https://github.com/aquasecurity/linux-bench/workflows/release/badge.svg
|
||||||
|
|
Loading…
Add table
Reference in a new issue