diff --git a/.github/workflows/deploy-bundestag.io-api.yaml b/.github/workflows/deploy-bundestag.io-api.yaml deleted file mode 100644 index fb09c9ee4..000000000 --- a/.github/workflows/deploy-bundestag.io-api.yaml +++ /dev/null @@ -1,76 +0,0 @@ -name: Docker – bundestag.io - -on: - workflow_dispatch: - push: - paths: - - 'bundestag.io/api/**' - branches: - - 'master' - tags: - - 'bundestag.io@v*' - pull_request: - paths: - - 'bundestag.io/api/**' - branches: - - 'master' - -jobs: - push: - runs-on: ubuntu-latest - environment: docker - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - images: democracy/bundestag.io - 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=bundestag.io@v(\d+.\d+.\d+)(-alpha.\d+)?,group=1 - type=semver,pattern={{version}},use=foo - type=sha,enable=${{ github.event_name == 'workflow_dispatch' }} - - name: Print Meta Summary - run: | - echo "🏷️ Tags: ${{ steps.meta.outputs.tags }} - " >> $GITHUB_STEP_SUMMARY - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@master - with: - install: true - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-multi-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-multi-buildx - - name: Login to DockerHub - uses: docker/login-action@v3 - 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@v4 - with: - context: bundestag.io/api - file: infra/Dockerfile - platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new - - name: Move buildx cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - name: Image digest - run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..b7425b9ee --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +enable-pre-post-scripts=true \ No newline at end of file diff --git a/bundestag.io/api/package.json b/bundestag.io/api/package.json index 914bc135b..e54377fe4 100644 --- a/bundestag.io/api/package.json +++ b/bundestag.io/api/package.json @@ -8,9 +8,9 @@ "Ulf Gebhardt" ], "license": "Apache2", - "private": true, "scripts": { "build": "tsc", + "prebuild": "pnpm run generate", "start": "node build/index.js", "dev": "ts-node-dev --watch=resolvers,schemas --respawn src/index.ts", "lint": "yarn lint:ts && yarn lint:exports", @@ -23,6 +23,7 @@ "@apollo/server": "^4.9.4", "@democracy-deutschland/bundestag.io-definitions": "1.0.2", "@democracy-deutschland/bundestagio-common": "workspace:*", + "@graphql-tools/merge": "^9.0.0", "@graphql-tools/schema": "^10.0.0", "@graphql-tools/utils": "^10.0.7", "axios": "1.5.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0a9b729d0..d555a82e3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -117,6 +117,9 @@ importers: '@democracy-deutschland/bundestagio-common': specifier: workspace:* version: link:../../common/bundestagio + '@graphql-tools/merge': + specifier: ^9.0.0 + version: 9.0.0(graphql@16.8.1) '@graphql-tools/schema': specifier: ^10.0.0 version: 10.0.0(graphql@16.8.1)