diff --git a/.github/workflows/hasura-dev.yml b/.github/workflows/hasura-dev.yml new file mode 100644 index 00000000..23e31832 --- /dev/null +++ b/.github/workflows/hasura-dev.yml @@ -0,0 +1,21 @@ +name: Deploy hasura - dev +on: + push: + branches: + - dev +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: deploy --endpoint $HASURA_ENDPOINT --admin-secret $HASURA_ADMIN_SECRET + env: + HASURA_ENDPOINT: ${{ secrets.HASURA_ENDPOINT }} + HASURA_ADMIN_SECRET: ${{ secrets.HASURA_ADMIN_SECRET }} + HASURA_WORKDIR: 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 diff --git a/.github/workflows/hasura-staging.yml b/.github/workflows/hasura-staging.yml new file mode 100644 index 00000000..4a78cd00 --- /dev/null +++ b/.github/workflows/hasura-staging.yml @@ -0,0 +1,21 @@ +name: Deploy hasura - dev +on: + push: + branches: + - staging +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: deploy --endpoint $HASURA_STAGING_ENDPOINT --admin-secret $HASURA_STAGING_ADMIN_SECRET + env: + HASURA_STAGING_ENDPOINT: ${{ secrets.HASURA_STAGING_ENDPOINT }} + HASURA_STAGING_ADMIN_SECRET: ${{ secrets.HASURA_STAGING_ADMIN_SECRET }} + HASURA_WORKDIR: 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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a0be3068..f24e9f11 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,22 +5,6 @@ on: - dev - staging 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: deploy --endpoint $HASURA_ENDPOINT --admin-secret $HASURA_ADMIN_SECRET - env: - HASURA_ENDPOINT: ${{ secrets.HASURA_ENDPOINT }} - HASURA_ADMIN_SECRET: ${{ secrets.HASURA_ADMIN_SECRET }} - HASURA_WORKDIR: 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 - build-and-push: runs-on: ubuntu-latest steps: