Code Monkey home page Code Monkey logo

hasura-action's Introduction

GitHub Actions for Hasura

This Action for Hasura enables arbitrary actions with the hasura cli.

Inputs

  • args - Required. This is the arguments you want to use for the hasura cli.

Environment variables

  • HASURA_ENDPOINT - Required. The endpoint of the Hasura GraphQL engine.

  • HASURA_ADMIN_SECRET - Optional. The admin secret (if any) for the Hasura GraphQL engine.

  • HASURA_WORKDIR - Optional. The path from the root of your repository to the directory where the migrations folder can be found.

  • HASURA_ENGINE_VERSION - Optional. The version of the hasura cli you want to use. By default, it will match the version from your endpoint and fall back on stable if the version endpoint request fails.

Example

To apply migrations with the Hasura CLI:

name: Hasura migration
on:
  push:
    branches:
      - master
jobs:
  hasura_migration:
    name: Hasura migration
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@v3
      - name: Apply hasura migrations
        uses: tibotiber/hasura-action@master # use a tagged version instead of master
        with:
          args: migrate apply --all-databases
        env:
          HASURA_ENDPOINT: ${{ secrets.HASURA_ENDPOINT }}
          HASURA_ADMIN_SECRET: ${{ secrets.HASURA_ADMIN_SECRET }}
          HASURA_WORKDIR: backend/hasura # replace this by your own path if needed
          HASURA_ENGINE_VERSION: v2.6.2 # replace this by the version you need, remove to use stable

License

The Dockerfile and associated scripts and documentation in this project are released under the MIT License.

This project was forked from GitHub Action for Firebase.

hasura-action's People

Contributors

tibotiber avatar cknuteson-firstlook avatar dbellotti avatar nis130 avatar rapidowl avatar

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.