Skip to content

Merge pull request #269 from metaDAOproject/fix/twap-and-cond-quote-t… #157

Merge pull request #269 from metaDAOproject/fix/twap-and-cond-quote-t…

Merge pull request #269 from metaDAOproject/fix/twap-and-cond-quote-t… #157

Workflow file for this run

name: STAGING -- Build & Push Docker Image
on:
push:
branches: [staging]
paths:
- "**"
jobs:
build_and_push:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
with:
submodules: "true"
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: themetadao/indexer
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: packages/indexer/Dockerfile
push: true
tags: themetadao/indexer:staging
labels: ${{ steps.meta.outputs.labels }}
redeploy_app:
name: Redeploy app on Railway
needs: build_and_push
runs-on: ubuntu-latest
steps:
- name: Call Redeploy API
run: |
curl https://backboard.railway.app/graphql/v2 \
-X POST \
-H "Authorization: Bearer ${{ secrets.RAILWAY_TOKEN }}" \
-H "Content-Type: application/json" \
--data '{"query": "mutation serviceInstanceDeploy($serviceId: String!, $environmentId: String!) {\n serviceInstanceDeploy(serviceId: $serviceId, environmentId: $environmentId)\n}\n", "variables": { "environmentId": "4015588d-3c82-4413-9484-314539aecd39", "serviceId": "783719dc-3c30-437d-a3a9-b1aeb1d5c487" } }'