diff --git a/.github/workflows/deploy-bundestag.io-admin.yaml b/.github/workflows/deploy-bundestag.io-admin.yaml deleted file mode 100644 index baf2cbe0f..000000000 --- a/.github/workflows/deploy-bundestag.io-admin.yaml +++ /dev/null @@ -1,55 +0,0 @@ -name: bundestag.io-admin/ Build and Push Docker Image - -on: - workflow_dispatch: - push: - paths: - - 'bundestag.io/admin/**' - branches: - - 'master' - tags: - - 'bundestag.io-admin@v*' - pull_request: - paths: - - 'bundestag.io/admin/**' - branches: - - 'master' - -jobs: - push: - runs-on: ubuntu-latest - environment: docker - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - images: democracy/bundestag.io-admin - tags: | - type=ref,event=branch,enable=${{ github.ref == format('refs/heads/{0}', 'master') || github.ref == format('refs/heads/{0}', 'alpha') || github.ref == format('refs/heads/{0}', 'internal') }} - type=ref,event=pr - type=match,asref=foo,pattern=crawler@v(\d+.\d+.\d+)(-alpha.\d+)?,group=1 - type=semver,pattern={{version}},use=foo - type=sha,enable=${{ github.event_name == 'workflow_dispatch' }} - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub - uses: docker/login-action@v1 - if: github.event_name != 'pull_request' - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - context: bundestag.io/admin - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - - name: Image digest - run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index f654d686d..4bdb847c0 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -4,6 +4,7 @@ on: pull_request: paths: - 'services/**' + - 'bundestag.io/**' branches: - 'master' diff --git a/bundestag.io/admin/.eslintrc b/bundestag.io/admin/.eslintrc index f52fd2cdd..cdb766c09 100644 --- a/bundestag.io/admin/.eslintrc +++ b/bundestag.io/admin/.eslintrc @@ -1,6 +1,7 @@ { "extends": ["next", "next/core-web-vitals"], "rules": { - "react/display-name": 0 + "react/display-name": 0, + "@typescript-eslint/no-explicit-any": ["warn"] } } diff --git a/bundestag.io/admin/Dockerfile b/bundestag.io/admin/Dockerfile deleted file mode 100644 index e27450d7e..000000000 --- a/bundestag.io/admin/Dockerfile +++ /dev/null @@ -1,41 +0,0 @@ -# Install dependencies only when needed -FROM node:16-alpine AS deps -# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. -RUN apk add --no-cache libc6-compat -WORKDIR /app -COPY package.json yarn.lock ./ -RUN yarn install --frozen-lockfile - -# Rebuild the source code only when needed -FROM node:16-alpine AS builder -WORKDIR /app -COPY . . -COPY --from=deps /app/node_modules ./node_modules -RUN yarn build && yarn install --production --ignore-scripts --prefer-offline - -# Production image, copy all the files and run next -FROM node:16-alpine AS runner -WORKDIR /app - -ENV NODE_ENV production - -RUN addgroup -g 1001 -S nodejs -RUN adduser -S nextjs -u 1001 - -# You only need to copy next.config.js if you are NOT using the default configuration -# COPY --from=builder /app/next.config.js ./ -COPY --from=builder /app/public ./public -COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next -COPY --from=builder /app/node_modules ./node_modules -COPY --from=builder /app/package.json ./package.json - -USER nextjs - -EXPOSE 3000 - -# Next.js collects completely anonymous telemetry data about general usage. -# Learn more here: https://nextjs.org/telemetry -# Uncomment the following line in case you want to disable telemetry. -# ENV NEXT_TELEMETRY_DISABLED 1 - -CMD ["yarn", "start"] \ No newline at end of file diff --git a/bundestag.io/admin/components/App.tsx b/bundestag.io/admin/components/App.tsx index 073260597..9dde7a26b 100644 --- a/bundestag.io/admin/components/App.tsx +++ b/bundestag.io/admin/components/App.tsx @@ -1,11 +1,10 @@ const App = ({ children }) => (
{children} -