Skip to content

Docker setup

Docker setup #10

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install deps. Unnecessary but cannot download the schema without this. Got a better idea? Open a PR!
run: npm ci
- name: Download GQL schema from main
run: GQL_URL=https://drips-multichain-api.up.railway.app/ GQL_ACCESS_TOKEN=${{ secrets.GQL_ACCESS_TOKEN }} ./scripts/generate-schema.sh
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/drips-app:${{ github.head_ref || github.ref_name }}