From 1b81e13aaf8c082dbf15229ab8728ce96d06d764 Mon Sep 17 00:00:00 2001 From: dysbulic Date: Wed, 3 Jul 2024 22:06:06 -0400 Subject: [PATCH] =?UTF-8?q?adding=20`hasura=20metadata=20reload`=20to=20de?= =?UTF-8?q?ploy=20Action=20=E2=9D=87=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gcp-deploy-frontend.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gcp-deploy-frontend.yaml b/.github/workflows/gcp-deploy-frontend.yaml index f5cc14099..2beb939c8 100644 --- a/.github/workflows/gcp-deploy-frontend.yaml +++ b/.github/workflows/gcp-deploy-frontend.yaml @@ -92,10 +92,12 @@ jobs: echo "APP_ENV=production" >> $GITHUB_ENV echo "HASURA_HOST=api.metagame.wtf" >> $GITHUB_ENV echo "FRONTEND_URL=https://metagame.wtf" >> $GITHUB_ENV + echo "HASURA_ADMIN_SECRET=${{secrets.HASURA_PROD_SECRET}}" >> $GITHUB_ENV else echo "APP_ENV=test" >> $GITHUB_ENV echo "HASURA_HOST=api-staging.metagame.wtf" >> $GITHUB_ENV echo "FRONTEND_URL=https://test.metagame.wtf" >> $GITHUB_ENV + echo "HASURA_ADMIN_SECRET=${{secrets.HASURA_DEV_SECRET}}" >> $GITHUB_ENV fi - name: Those Variables May Now Be Interpolated id: second @@ -111,10 +113,24 @@ jobs: echo "FRONTEND_TAG=\ ${{env.DOCKER_PATH}}/frontend:${{github.ref_name}}" >> $GITHUB_ENV + hasura-metadata: + name: Update Hasura Metadata + runs-on: ubuntu-latest + needs: [env] + + steps: + - name: Run `hasura metadata reload` + uses: browniefed/hasura-runner@master + with: + args: metadata reload + env: + HASURA_ENDPOINT: ${{needs.env.GRAPHQL_URL}} + HASURA_ADMIN_SECRET: ${{needs.env.HASURA_ADMIN_SECRET }} + build-frontend: name: Build Frontend Container Image runs-on: ubuntu-latest - needs: [env] + needs: [env, hasura-metadata] steps: - name: Set Up Docker Buildx