Code Monkey home page Code Monkey logo

action-openfga-deploy's Introduction

OpenFGA Github Action - Deploy

FOSSA Status

This action can be used to deploy your authorization model to an OpenFGA store.

Parameter

Parameter Required/Optional Description
api-url Required The URL to your OpenFGA server
api-token Required The token used to when preshared keys are used to authenticate the OpenFGA server
store-id Required The store to which the model should be deployed
model-file-path Optional The path to your model file relative to the root of your project
model Optional The model value if file is not used, Ensure it is character escaped.
format Optional Authorization model input format. Can be "fga" or "json", defaults to auto-detecting from the file extension

Outputs

Output Description
authorization_model_id The ID of the deployed Authorization Model

Example

name: Deploy Action

on:
  workflow_dispatch:

jobs:
  deploy:
    name: Deploy Authorization Model
    runs-on: ubuntu-latest
    steps:
      - name: Deploy using a file
        uses: openfga/[email protected]
        with:
          api-url: http://localhost:8080
          api-token: ${{ secrets.KEY }}
          store-id: ${{ env.STORE_ID }}
          model-file-path: ./example/model.fga
      - name: Deploy using a string
        uses: openfga/[email protected]
        with:
          api-url: http://localhost:8080
          api-token: ${{ secrets.KEY }}
          store-id: ${{ env.STORE_ID }}
          format: json
          model: '{\"schema_version\":\"1.1\",\"type_definitions\":\[\{\"type\":\"user\"\},\{\"type\":\"document\",\"relations\":\{\"reader\":\{\"this\":\{\}\},\"writer\":\{\"this\":\{\}\},\"owner\":\{\"this\":\{\}\}\},\"metadata\":\{\"relations\":\{\"reader\":\{\"directly_related_user_types\":\[\{\"type\":\"user\"\}\]\},\"writer\":\{\"directly_related_user_types\":\[\{\"type\":\"user\"\}\]\},\"owner\":\{\"directly_related_user_types\":\[\{\"type\":\"user\"\}\]\}\}\}\}\]\}'

License

FOSSA Status

action-openfga-deploy's People

Contributors

aaguiarz avatar big-kahuna-burger avatar fossabot avatar le-yams avatar poovamraj avatar rhamzeh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

action-openfga-deploy's Issues

Release authorization model id output

Hello there,

I did the PR #12, which has been merged, so the action output the deployed authorization model id.

Could you create a new release with it please? ๐Ÿ™

Regards,
Yann

Authorization Model ID as step output

Would be useful to have Authorization Model ID as step output of the github action so we can for example reuse the model id value in next steps/jobs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.