Skip to content

Bump cypress from 12.17.1 to 12.17.2 in /e2e #828

Bump cypress from 12.17.1 to 12.17.2 in /e2e

Bump cypress from 12.17.1 to 12.17.2 in /e2e #828

Workflow file for this run

name: build
on:
push:
branches:
- "main"
- "feature/*"
workflow_dispatch:
pull_request:
branches:
- "main"
jobs:
build:
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: Checkout
uses: actions/checkout@v3
- name: Build for test
uses: docker/bake-action@v2.3.0
with:
files: ./docker-bake.hcl
load: true
set: |
"api.cache-from=type=gha,scope=api"
"web.cache-from=type=gha,scope=web"
"api.cache-to=type=gha,mode=max,scope=api"
"web.cache-to=type=gha,mode=max,scope=web"
"web.tags=espressoweb"
"api.tags=espressoapi"
- name: Start container
run: docker run -d -p 80:80 --health-interval=5s --name web espressoweb
- name: Cypress run
uses: cypress-io/github-action@v5
with:
working-directory: e2e
config: baseUrl=http://localhost
- name: Check container health
run: |
docker inspect -f '{{.State.Health.Status}}' web
[ "$(docker inspect -f '{{.State.Health.Status}}' web)" == "healthy" ]
- name: Docker log
if: always()
run: docker logs web
- name: Docker meta api
id: meta-api
uses: docker/metadata-action@v4
with:
images: ghcr.io/stefanschoof/espressoapi
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
bake-target: docker-metadata-action-api
- name: Docker meta web
id: meta-web
uses: docker/metadata-action@v4
with:
images: ghcr.io/stefanschoof/espressoweb
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
bake-target: docker-metadata-action-web
- name: Merge bake json into single file
# workaround for https://github.com/docker/buildx/issues/756
# and https://github.com/docker/metadata-action/issues/124
run: jq --slurp '.[0] * .[1]' ${{ steps.meta-web.outputs.bake-file }} ${{ steps.meta-api.outputs.bake-file }} > docker-bake.json
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Build
uses: docker/bake-action@v2.3.0
with:
push: ${{ github.event_name != 'pull_request' }}