Skip to content

fix: docker image

fix: docker image #365

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
validations:
runs-on: ubuntu-latest
services: # We use GH services because we cannot mount a volume as we do in the docker-compose
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: quests_db
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v1
- uses: actions/checkout@v2
- run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: false
shared-key: main
key: build
- name: Run tests
run: cargo test --verbose
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/quests_db
REDIS_URL: localhost:6379
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Debug
run: ls -la
- name: Build and push (quests server)
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: quay.io/decentraland/quests-server:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
PROJECT=quests_server