Skip to content

Update dependency rollup to v4 - autoclosed #616

Update dependency rollup to v4 - autoclosed

Update dependency rollup to v4 - autoclosed #616

Workflow file for this run

name: Build branch and run tests
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
jobs:
build-test-publish:
runs-on: ubuntu-latest
steps:
# Configuration
- name: set image path
id: tag
run: |
if [ "main" == $GITHUB_REF_NAME ]
then
IMAGE_TAG=latest
else
IMAGE_TAG=$(echo ${GITHUB_REF_NAME} | md5sum | awk '{print $1}')
fi
IMAGE_NAME=$(echo ghcr.io/${GITHUB_REPOSITORY}/webkeyfinder | tr '[:upper:]' '[:lower:]')
echo "image_name=${IMAGE_NAME}" >> $GITHUB_ENV
echo "image_path=${IMAGE_NAME}:${IMAGE_TAG}" >> $GITHUB_ENV
# Setup Docker
- name: set up docker buildx
uses: docker/setup-buildx-action@v2
with:
install: true
- name: login container registry
run: docker login -u publisher -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
- uses: actions/checkout@v4
- name: pull docker image
run: |
docker pull ${{ env.image_name }}:latest
docker pull ${{ env.image_path }} || true
- name: build docker image
run: >
DOCKER_BUILDKIT=1
docker build
--load
--cache-from ${{ env.image_name }}:latest,${{ env.image_path }}
--build-arg BUILDKIT_INLINE_CACHE=1
--tag ${{ env.image_path }} .
- name: push docker image
run: docker push ${{ env.image_path }}
- name: run image
run: docker run -d -p 3000:3000 ${{ env.image_path }}
- name: run cypress
uses: cypress-io/github-action@v6
with:
# browser: chrome // overridden by 'command'
install-command: yarn install --immutable --immutable-cache
command: yarn run --binaries-only cypress run --browser chrome
config-file: cypress.config.mjs
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-output
path: |
cypress/screenshots
cypress/videos