Skip to content

build(deps-dev): bump @typescript-eslint/eslint-plugin in /frontend #11117

build(deps-dev): bump @typescript-eslint/eslint-plugin in /frontend

build(deps-dev): bump @typescript-eslint/eslint-plugin in /frontend #11117

name: Docker | E2E | Deployment
on: push
jobs:
build-and-push-images:
strategy:
matrix:
folder: [authentik, backend, frontend, presenter]
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/${{ matrix.folder }}
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.1.7
- name: Log in to the Container registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@0de3687b53cd804b63dd87819f7bda043569ce4a
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=schedule
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=branch
type=ref,event=pr
type=sha
- name: Build and push Docker images
id: push
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355
with:
context: ${{ matrix.folder }}
target: production
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# This will clutter our packages. I think it's fine to leave that out:
# https://docs.github.com/en/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds
#
# - name: Generate artifact attestation
# uses: actions/attest-build-provenance@210c1913531870065f03ce1f9440dd87bc0938cd # v1.4.0
# with:
# subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
# subject-digest: ${{ steps.push.outputs.digest }}
# push-to-registry: true
e2e-tests:
name: Run all E2E tests
runs-on: ubuntu-latest
needs: build-and-push-images
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.1.7
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.0.3
with:
node-version-file: './.tool-versions'
- run: echo "IMAGE_TAG=sha-$(echo $GITHUB_SHA | cut -c 1-7)" > .env
- run: touch backend/.env # docker-compose requires `env_file:` to be present https://github.com/docker/compose/issues/3560
- run: docker compose -f docker-compose.yml up -d --wait --quiet-pull
- name: Install cucumber-json-formatter
run: |
wget --no-verbose -O /opt/cucumber-json-formatter "https://github.com/cucumber/json-formatter/releases/download/v19.0.0/cucumber-json-formatter-linux-386"
chmod +x /opt/cucumber-json-formatter
sudo ln -fs /opt/cucumber-json-formatter /usr/bin/cucumber-json-formatter
- name: E2E | Run all tests
id: e2e-run
uses: cypress-io/github-action@f1f0912d392f0d06bdd01fb9ebe3b3299e5806fb # v6.7.2
with:
working-directory: tests
- name: E2E | if tests failed, compile html report
if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
run: |
cd cypress/
npx tsx create-cucumber-html-report.ts
working-directory: tests
- name: Get PR number
if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
uses: jwalton/gh-find-current-pr@89ee5799558265a1e0e31fab792ebb4ee91c016b # v1.3.3
id: pr-number
- name: E2E | if tests failed, upload report
if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: dreammall-e2e-test-report-pr-${{ steps.pr-number.outputs.pr }}
path: /home/runner/work/dreammall.earth/dreammall.earth/tests/cypress/reports/dreammall-e2e_html_report