feat: adds indexes on db tables and inits a rust api backend #50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Hasura Remote Image migrate | |
on: | |
push: | |
paths: | |
- 'backend/hasura/**' | |
branches: | |
- dev | |
pull_request: | |
branches: | |
- dev | |
paths: | |
- 'backend/hasura/**' | |
jobs: | |
hasura_migrate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: "curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash" | |
- name: hasura migrate | |
run: | | |
cd backend/hasura/hasura | |
sed -i "s|^endpoint:.*|endpoint: ${HASURA_ENDPOINT}|" config.yaml | |
sed -i "s|^admin_secret:.*|admin_secret: ${HASURA_ADMIN_SECRET}|" config.yaml | |
cd ../../.. | |
env: | |
HASURA_ENDPOINT: ${{ secrets.HASURA_ENDPOINT }} | |
HASURA_ADMIN_SECRET: ${{ secrets.HASURA_ADMIN_SECRET }} | |
- name: applying metadata | |
run: | | |
hasura metadata apply | |
working-directory: backend/hasura/hasura | |
- name: applying migrations | |
run: | | |
hasura migrate apply --all-databases | |
working-directory: backend/hasura/hasura |