Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cerbos/cerbos-compile-action
Compile and test Cerbos policies
https://github.com/cerbos/cerbos-compile-action
actions cerbos
Last synced: about 18 hours ago
JSON representation
Compile and test Cerbos policies
- Host: GitHub
- URL: https://github.com/cerbos/cerbos-compile-action
- Owner: cerbos
- License: apache-2.0
- Created: 2021-10-21T10:08:32.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-01T14:23:27.000Z (about 1 month ago)
- Last Synced: 2024-10-02T11:01:38.582Z (about 1 month ago)
- Topics: actions, cerbos
- Language: TypeScript
- Homepage: https://cerbos.dev
- Size: 1.42 MB
- Stars: 6
- Watchers: 4
- Forks: 3
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cerbos Compile Action
A GitHub action to validate Cerbos policies using the compiler and run policy tests if there are any.
Cerbos helps you super-charge your authorization implementation by writing context-aware access control policies for your application resources. Find out more about Cerbos using the following resources:
- [Cerbos website](https://cerbos.dev)
- [Cerbos documentation](https://docs.cerbos.dev)
- [Cerbos GitHub repository](https://github.com/cerbos/cerbos)
- [Cerbos Slack community](http://go.cerbos.io/slack)## Usage
Use the [cerbos-setup-action](https://github.com/cerbos/cerbos-setup-action) to install Cerbos binaries. Then use this action to validate and test your Cerbos policies. See the [documentation](https://docs.cerbos.dev/cerbos/latest/policies/compile.html) for more information about how to compile policies and author policy tests.
```yaml
- uses: actions/checkout@v2- name: Setup Cerbos
uses: cerbos/cerbos-setup-action@v1- name: Compile with Cerbos
uses: cerbos/cerbos-compile-action@v1
with:
policyDir: policies
```## Development
### Prerequisites
You'll need to install
- Node.js, matching the version specified in our [.node-version](../.node-version) file
- A version manager that supports this file is recommended, for example [n](https://github.com/tj/n#readme).
Note that [nvm](https://github.com/nvm-sh/nvm) [does not](https://github.com/nvm-sh/nvm/issues/794).- pnpm, matching the version specified in our [package.json](./package.json) file
- After installing Node.js, you can enable [Corepack](https://nodejs.org/api/corepack.html) to transparently install the correct `pnpm` version:
```console
$ corepack enable
```### Build
```
pnpm run all
```