Skip to content

Cypress refactor

Cypress refactor #81

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches: ['main']
tags: ['v*']
pull_request:
branches: ['main']
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- dockerfile: ./apps/api/Dockerfile
image: ghcr.io/douglasneuroinformatics/open-data-capture-api
- dockerfile: ./apps/gateway/Dockerfile
image: ghcr.io/douglasneuroinformatics/open-data-capture-gateway
- dockerfile: ./apps/playground/Dockerfile
image: ghcr.io/douglasneuroinformatics/open-data-capture-playground
- dockerfile: ./apps/web/Dockerfile
image: ghcr.io/douglasneuroinformatics/open-data-capture-web
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Environment
run: ./scripts/generate-env.sh
- name: Set Up QEMU
uses: docker/setup-qemu-action@v3
- name: Set Up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
- name: Build and Push Docker Images
uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.dockerfile }}
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}