Skip to content

feat(esm): moving annotations api to esm #864

feat(esm): moving annotations api to esm

feat(esm): moving annotations api to esm #864

name: Annotations API
on:
# Only run the tests for this service when any of the following file paths change
pull_request:
paths:
- 'infrastructure/annotations-api/**'
- 'packages/**'
- 'docker-compose.yml'
- 'servers/annotations-api/**'
- 'lambdas/annotations-api-events/**'
- 'pnpm-lock.yaml'
- 'Dockerfile'
- '.github/actions/**'
- '.github/workflows/annotations-api.yml'
- '.github/workflows/reuse-*.yml'
push:
branches:
- main
- dev
paths:
- 'infrastructure/annotations-api/**'
- 'packages/**'
- 'servers/annotations-api/**'
- 'lambdas/annotations-api-events/**'
- 'pnpm-lock.yaml'
- 'Dockerfile'
- '.github/actions/**'
- '.github/workflows/annotations-api.yml'
- '.github/workflows/reuse-*.yml'
jobs:
test-integrations:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/reuse-test-integrations.yml
with:
scope: annotations-api
secrets: inherit
apollo:
uses: ./.github/workflows/reuse-apollo-federation.yml
with:
federated-graph-name: pocket-client-api
graph-name: annotations-api
schema-file-path: servers/annotations-api/dist/schema-generated.graphql
prod-graph-url: https://annotations-api.readitlater.com
dev-graph-url: https://annotations-api.getpocket.dev
scope: annotations-api
secrets:
apollo-key: ${{ secrets.APOLLO_CLIENT_API_KEY }}
infrastructure:
uses: ./.github/workflows/reuse-infrastructure.yml
with:
scope: annotations-api-cdk
stack-output-path: infrastructure/annotations-api/cdktf.out/stacks/annotations-api
secrets: inherit
api:
uses: ./.github/workflows/reuse-build-and-push-image.yml
needs: [infrastructure]
with:
scope: annotations-api
app-path: servers/annotations-api
app-port: 4008
sentry-project: annotations-api
docker-repo-name-pattern: annotationsapi-{0}-app
terraform-output: ${{needs.infrastructure.outputs.terraform-output}}
secrets: inherit
events-lambda:
uses: ./.github/workflows/reuse-build-and-push-lambda.yml
needs: [infrastructure]
with:
scope: annotations-api-events-lambda
sentry-project: annotations-api
s3-bucket-pattern: pocket-annotationsapi-{0}-sqs-event-consumer
codedeploy-app-name-pattern: AnnotationsAPI-{0}-Sqs-Event-Consumer-Lambda
codedeploy-group-name-pattern: AnnotationsAPI-{0}-Sqs-Event-Consumer-Lambda
function-name-pattern: AnnotationsAPI-{0}-Sqs-Event-Consumer-Function
secrets: inherit
sentry:
if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main'
uses: ./.github/workflows/reuse-sentry-release.yml
needs: [api, events-lambda]
with:
sentry-project: annotations-api
sentry-environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'development' }}
secrets: inherit