Skip to content

cerbos/cerbos-store-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Cerbos Store Action

A GitHub action to upload Cerbos policies to Cerbos Hub stores.

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:

Usage

This action automatically installs cerbosctl if it doesn't already exist or if the installed version (via cerbos-setup-action) doesn't match the specified version.

Upload new local git repository changes relative to the remote store's current version

- name: Upload cerbos policies
  uses: cerbos/cerbos-store-action@v1
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    store_id: ${{ secrets.CERBOS_HUB_STORE_ID }}
    client_id: ${{ secrets.CERBOS_HUB_CLIENT_ID }}
    client_secret: ${{ secrets.CERBOS_HUB_CLIENT_SECRET }}
    subdir: policies # optional subdirectory of Cerbos policies

Upload new local git repository changes between from_revision and to_revision

- name: Upload cerbos policies
  uses: cerbos/cerbos-store-action@v1
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    store_id: ${{ secrets.CERBOS_HUB_STORE_ID }}
    client_id: ${{ secrets.CERBOS_HUB_CLIENT_ID }}
    client_secret: ${{ secrets.CERBOS_HUB_CLIENT_SECRET }}
    from_revision: main
    to_revision: HEAD
    subdir: policies # optional subdirectory of Cerbos policies

Development

Prerequisites

You'll need to install

  • Node.js, matching the version specified in our .node-version file

    • A version manager that supports this file is recommended, for example n. Note that nvm does not.
  • pnpm, matching the version specified in our package.json file

    • After installing Node.js, you can enable Corepack to transparently install the correct pnpm version:
      $ corepack enable

Build

pnpm run build

About

A GitHub action to upload Cerbos policies to Cerbos Hub stores

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •