This Action for Hasura enables arbitrary actions with the hasura
cli.
args
- Required. This is the arguments you want to use for thehasura
cli.
-
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 themigrations
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 onstable
if the version endpoint request fails.
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@master
- name: Apply hasura migrations
uses: tibotiber/hasura-action@master
with:
args: migrate apply
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: v1.3.3 # replace this by the version you need, remove to use stable
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.