Skip to content

Commit e46b8af

Browse files
authored
Add a release process for a v0.0.1 version of the CLI (#21)
- Add goreleaser to release binaries on git tag pushes. - Update the README in preparation of a release Signed-off-by: Lennard Eijsackers <lennardeijsackers92@gmail.com>
1 parent 4be7678 commit e46b8af

File tree

3 files changed

+102
-2
lines changed

3 files changed

+102
-2
lines changed

.github/workflows/release.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: goreleaser
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
goreleaser:
10+
runs-on: ubuntu-latest
11+
steps:
12+
-
13+
name: Checkout
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
-
18+
name: Set up Go
19+
uses: actions/setup-go@v2
20+
with:
21+
go-version: 1.15
22+
-
23+
name: Run GoReleaser
24+
uses: goreleaser/goreleaser-action@v2
25+
with:
26+
version: latest
27+
args: release --rm-dist
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This is an example goreleaser.yaml file with some sane defaults.
2+
# Make sure to check the documentation at http://goreleaser.com
3+
before:
4+
hooks:
5+
- go mod download
6+
builds:
7+
- env:
8+
- CGO_ENABLED=0
9+
goos:
10+
- linux
11+
- windows
12+
- darwin
13+
archives:
14+
- replacements:
15+
darwin: Darwin
16+
linux: Linux
17+
windows: Windows
18+
386: i386
19+
amd64: x86_64
20+
checksum:
21+
name_template: 'checksums.txt'
22+
snapshot:
23+
name_template: "{{ .Tag }}-next"
24+
changelog:
25+
sort: asc
26+
filters:
27+
exclude:
28+
- '^docs:'
29+
- '^test:'

README.md

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,44 @@
1-
# policy-hub-cli
2-
CLI for searching Rego policies
1+
# PolicyHub CLI
2+
3+
This is the home of the PolicyHub CLI, a CLI tool that makes Rego policies searchable.
4+
5+
## Goals
6+
7+
Policies are everywhere. Compliance policies, security policies, policies that define organisational best practices. The Open Policy Agent project provided a single policy language, Rego, that can be used to automate policy enforcement. However currently there is no existing mechanism that allows you to search for specific Rego policies.
8+
9+
For example you might be looking for a set of policies that validate Kubernetes security best practices as a starting point for your organisations Kubernetes policies. Or you might be looking for a set of Microservice Authorization policies. Right now you have to hope that your google search points you in the right direction.
10+
11+
The PolicyHub CLI aims to make policies searchable. We provide a standard format for policy creators to share their policies. Users of the CLI can search our registry for specific tags or descriptions, hopefully finding the policy they where looking for.
12+
13+
## Searching policies
14+
15+
To search our registry, you can use the `search` command:
16+
17+
```bash
18+
> policy-hub search
19+
20+
+---------------------------+---------------------------------+--------------------------------+
21+
| NAME | MAINTAINERS | LABELS |
22+
+---------------------------+---------------------------------+--------------------------------+
23+
| deprek8ion | https://github.com/swade1987 | k8s, kubernetes, gatekeeper |
24+
| contrib.k8s_node_selector | https://github.com/tsandall | kubernetes, k8s, node_selector |
25+
| redhat-cop.rego-policies | https://github.com/garethahealy | k8s, kubernetes, gatekeeper |
26+
| konstraint | https://github.com/garethahealy | k8s, kubernetes, gatekeeper |
27+
+---------------------------+---------------------------------+--------------------------------+
28+
```
29+
30+
## Downloading policies
31+
32+
To download a policy, use the `pull` command:
33+
34+
```bash
35+
> policy-hub pull konstraint
36+
```
37+
38+
## Contributing
39+
40+
Join us make policies more searchable!
41+
42+
- We accept contributions to our registry.
43+
- Use [GitHub Issues](https://github.com/policy-hub/policy-hub-cli/issues) to file bugs or propose new features.
44+
- Create a [Pull Request](https://github.com/policy-hub/policy-hub-cli/pulls) and contribute to the project.

0 commit comments

Comments
 (0)