Skip to content

chore(ci): move to GitHub actions #15

chore(ci): move to GitHub actions

chore(ci): move to GitHub actions #15

name: Account Data Deleter
on:
# Only run the tests for this service when any of the following file paths change
pull_request:
paths:
- 'infrastructure/account-data-deleter/**'
- 'packages/**'
- 'servers/account-data-deleter/**'
- 'lambdas/account-data-deleter-batch-delete/**'
- 'lambdas/account-data-deleter-events/**'
- 'pnpm-lock.yaml'
- '.github/actions/**'
- '.github/workflows/account-data-deleter.yml'
- '.github/workflows/reuse-*.yml'
push:
branches:
- main
- dev
jobs:
# Let's test the service against some real life and mocked docker services.
test-integrations:
# Only run this job on a pull request event
if: github.event_name == 'pull_request'
# Use our re-usable test integrations workflow which will use our docker compose file
uses: ./.github/workflows/reuse-test-integrations.yml
with:
# Only run the tests for our service
scope: account-data-deleter
# Ensure the re-usable workflow is allowed to access the secrets
secrets: inherit
# It's infrastructure time, run the infrastructure update commands
infrastructure:
uses: ./.github/workflows/reuse-infrastructure.yml
with:
scope: account-data-deleter-cdk
stack-output-path: infrastructure/account-data-deleter/cdktf.out/stacks/account-data-deleter
# Ensure the re-usable workflow is allowed to access the secrets
secrets: inherit
# Let's try building and conidtionally pushing our docker image to the necessary account.
api:
uses: ./.github/workflows/reuse-build-and-push-image.yml
needs: [infrastructure]
with:
scope: account-data-deleter
app-path: servers/account-data-deleter
app-port: 4015
sentry-project: account-data-deleter
docker-repo-name-pattern: accountdatadeleter-{0}-app
# Ensure the re-usable workflow is allowed to access the secrets
secrets: inherit
events-lambda:
uses: ./.github/workflows/reuse-build-and-push-lambda.yml
needs: [infrastructure]
with:
scope: account-data-deleter-events
sentry-project: account-data-deleter
s3-bucket-pattern: pocket-accountdatadeleter-{0}-sqs-event-consumer
# Ensure the re-usable workflow is allowed to access the secrets
secrets: inherit
batch-delete-lambda:
uses: ./.github/workflows/reuse-build-and-push-lambda.yml
needs: [infrastructure]
with:
scope: account-data-deleter-batch-delete
sentry-project: account-data-deleter
s3-bucket-pattern: pocket-accountdatadeleter-{0}-batchdeletelambda
# Ensure the re-usable workflow is allowed to access the secrets
secrets: inherit