feat(coprocessor): auth coprocessor poc [WIP] #950
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Client API | |
on: | |
pull_request: | |
paths: | |
- 'infrastructure/client-api/**' | |
- 'packages/**' | |
- 'docker-compose.yml' | |
- 'servers/client-api/**' | |
- 'pnpm-lock.yaml' | |
- '.github/actions/**' | |
- '.github/workflows/client-api.yml' | |
- '.github/workflows/reuse-*.yml' | |
- 'servers/coprocessor/**' | |
push: | |
branches: | |
- main | |
- dev | |
paths: | |
- 'infrastructure/client-api/**' | |
- 'packages/**' | |
- 'servers/client-api/**' | |
- 'pnpm-lock.yaml' | |
- '.github/actions/**' | |
- '.github/workflows/client-api.yml' | |
- '.github/workflows/reuse-*.yml' | |
- 'servers/coprocessor/**' | |
jobs: | |
infrastructure: | |
uses: ./.github/workflows/reuse-infrastructure.yml | |
with: | |
scope: '@infrastructure/client-api' | |
stack-output-path: infrastructure/client-api/cdktf.out/stacks/client-api | |
secrets: inherit | |
coprocessor: | |
uses: ./.github/workflows/reuse-build-and-push-image.yml | |
needs: [infrastructure] | |
with: | |
scope: '@server/coprocessor' | |
docker-repo-name-pattern: clientapi-{0}-coprocessor | |
app-path: servers/coprocessor | |
# Do not pass terraform-output because we don't want to redo codedeploy | |
# and it's conditional on this output | |
secrets: inherit | |
api: | |
uses: ./.github/workflows/reuse-build-and-push-image.yml | |
# Require coprocessor dependency because we need the image to | |
# be built and pushed prior to codedeploy | |
needs: [infrastructure, coprocessor] | |
with: | |
scope: '@server/client-api' | |
docker-repo-name-pattern: clientapi-{0}-app | |
context: servers/client-api | |
app-path: servers/client-api | |
terraform-output: ${{needs.infrastructure.outputs.terraform-output}} | |
secrets: inherit |