Skip to content

Update CI

Update CI #84

Workflow file for this run

name: 🏗️ Build Engine
on:
push:
paths:
- 'engine/**'
- '.github/workflows/build.yaml'
jobs:
deploy:
runs-on: ubuntu-20.04
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
with:
version: "v0.7.4"
- name: Start postgres via docker-compose dev
working-directory: ./engine
run: docker compose -f ./compose.yaml up postgres -d
- name: Migrate db
working-directory: ./engine
run: cargo install sqlx-cli --no-default-features --features native-tls,postgres && sqlx migrate run
- name: Build
working-directory: ./engine
run: sqlx migrate run
- name: Get Runner IP
id: get_ip
run: echo "RUNNER_IP=$(hostname -I | awk '{print $1}')" >> $GITHUB_ENV
- name: Build docker image using github actions
uses: docker/build-push-action@v5
with:
context: ./engine
file: ./engine/.build/Dockerfile
tags: v3x-property-engine:latest
push: false
build-args: |
- BINARY_NAME=v3x-property-engine
- DATABASE_URL=postgres://postgres:postgres@${{ env.RUNNER_IP }}:5432/postgres