Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tibotiber/hasura-action
GitHub Action wrapping the Hasura CLI
https://github.com/tibotiber/hasura-action
continuous-integration contribution github-actions hasura open-source
Last synced: about 1 month ago
JSON representation
GitHub Action wrapping the Hasura CLI
- Host: GitHub
- URL: https://github.com/tibotiber/hasura-action
- Owner: tibotiber
- License: other
- Created: 2019-11-14T09:24:30.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-05-26T03:48:54.000Z (over 2 years ago)
- Last Synced: 2024-08-16T21:33:58.714Z (5 months ago)
- Topics: continuous-integration, contribution, github-actions, hasura, open-source
- Language: Shell
- Size: 11.7 KB
- Stars: 51
- Watchers: 2
- Forks: 21
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Actions for Hasura
This Action for [Hasura](https://hasura.io) 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:
```yaml
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](LICENSE).
This project was forked from [GitHub Action for Firebase](https://github.com/w9jds/firebase-action).