Skip to content

Make CI great again #344

Make CI great again

Make CI great again #344

Workflow file for this run

name: Build Docker Image
on:
push:
branches-ignore:
- 'dependabot/**'
paths-ignore:
- "*.md"
pull_request:
paths-ignore:
- "*.md"
jobs:
build-image:
name: Build Docker Image and Test Docker Compose
env:
MYSQL_PASSWORD: sylius-mysql
DOCKER_BUILDKIT: 1 # Requires Latest Buildx in docker CLI
COMPOSE_DOCKER_CLI_BUILD: 1 # Requires Latest Buildx in docker compose CLI
strategy:
fail-fast: false
matrix:
platform: [linux/amd64,linux/arm64]
docker_compose: [docker-compose.yml,docker-compose.prod.yml]
runs-on: ubuntu-latest
steps:
-
name: Set Up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set Up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build Image
uses: docker/build-push-action@v3
with:
push: false
platforms: ${{ matrix.platform }}
cache-from: type=gha
cache-to: type=gha
load: true
-
name: Shutdown Default MySQL
run: sudo service mysql stop
if: matrix.platform == 'linux/amd64'
-
name: Checkout Code
uses: actions/checkout@v3
if: matrix.platform == 'linux/amd64'
-
name: Setup Sylius Store
run: LOAD_FIXTURES=1 docker compose -f ${{ matrix.docker_compose }} up -d
if: matrix.platform == 'linux/amd64'
-
name: Health Check Store
run: ./docker/test.sh
if: matrix.platform == 'linux/amd64'