Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Pocket/pocket-monorepo into github-…
Browse files Browse the repository at this point in the history
…actions
  • Loading branch information
bassrock committed Aug 20, 2024
2 parents be9fa9e + 1fa1816 commit 61cd110
Show file tree
Hide file tree
Showing 92 changed files with 1,147 additions and 1,652 deletions.
2 changes: 1 addition & 1 deletion .github/actions/build-lambda/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runs:
using: 'composite'
steps:
- name: Install pnpm & node
uses: ./.github/actions/install-pnpm-and-node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@github-actions
with:
scope: ${{ inputs['scope'] }}
# Theres a really annoying bug in PNPM deploy command that will try and create a folder at /home/pruned which we are not allowed to do,
Expand Down
6 changes: 2 additions & 4 deletions .github/actions/cdktf/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,8 @@ runs:
restore-keys: |
${{ runner.os }}-tfenv-
# TODO: These need to request AWS credentials to run terraform
# It may be best to not do AWS credentials here and do it in the calling workflow.. TBD

- name: Install pnpm & node
uses: ./.github/actions/install-pnpm-and-node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@github-actions
with:
scope: ${{ inputs['scope'] }}

Expand Down Expand Up @@ -86,6 +83,7 @@ runs:
env:
TERRAFORM_TOKEN: ${{ inputs.pagerduty-token }}
GITHUB_TOKEN: ${{ inputs.github-token }}
PAGERDUTY_TOKEN: ${{ inputs.pagerduty-token }}
run: |
cd ${{ inputs.stack-output-path }}
if [ "${{ inputs.behavior }}" = "apply" ]; then
Expand Down
1 change: 1 addition & 0 deletions .github/actions/raw-terraform/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ runs:
env:
TERRAFORM_TOKEN: ${{ inputs.pagerduty-token }}
GITHUB_TOKEN: ${{ inputs.github-token }}
PAGERDUTY_TOKEN: ${{ inputs.pagerduty-token }}
run: |
cd ${{ inputs.stack-output-path }}
if [ "${{ inputs.behavior }}" = "apply" ]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
fetch-depth: 2

- name: Install pnpm & node
uses: ./.github/actions/install-pnpm-and-node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@github-actions

- name: Semantic Release
run: pnpm run semantic-release
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
uses: actions/checkout@v4

- name: Install pnpm & node
uses: ./.github/actions/install-pnpm-and-node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@github-actions

- name: Check for mismatched dependencies
run: pnpm run list-mismatches
Expand All @@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@v4

- name: Install pnpm & node
uses: ./.github/actions/install-pnpm-and-node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@github-actions

- name: Lint code
run: pnpm run lint
Expand All @@ -36,7 +36,7 @@ jobs:
uses: actions/checkout@v4

- name: Install pnpm & node
uses: ./.github/actions/install-pnpm-and-node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@github-actions

- name: Unit tests
# Following uses a 2 concurrency because terraform modules seems to fail with an OOM error on CI if we do more.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reuse-apollo-federation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
fetch-depth: 0
- name: Install pnpm & node
if: ${{ inputs.scope != '' }}
uses: ./.github/actions/install-pnpm-and-node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@github-actions
with:
scope: ${{ inputs['scope'] }}
- name: Build schema
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/reuse-build-and-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
with:
name: ${{inputs.archive-download-name}}
- name: Build Docker Image
uses: ./.github/actions/containerize
uses: pocket/pocket-monorepo/.github/actions/containerize@github-actions
with:
docker-repo-name: "${{inputs.development-aws-registry }}/${{ format(inputs.docker-repo-name-pattern, 'dev') }}"
app-path: ${{inputs.app-path}}
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
role-to-assume: arn:aws:iam::410318598490:role/PocketGHARole
- name: Build and Push Development Docker Image
id: dev-docker-build
uses: ./.github/actions/containerize
uses: pocket/pocket-monorepo/.github/actions/containerize@github-actions
with:
docker-repo-name: "${{inputs.development-aws-registry }}/${{ format(inputs.docker-repo-name-pattern, 'dev') }}"
app-path: ${{inputs.app-path}}
Expand All @@ -123,7 +123,7 @@ jobs:
scope: ${{inputs.scope}}
push: true
- name: Code Deploy Docker Image
uses: ./.github/actions/ecs-codedeploy
uses: pocket/pocket-monorepo/.github/actions/ecs-codedeploy@github-actions
if: fromJSON(inputs.terraform-output).ecs-task-containerName.value != ''
with:
docker-image-name: ${{steps.dev-docker-build.outputs.docker-image-name}}
Expand All @@ -149,7 +149,7 @@ jobs:
role-to-assume: arn:aws:iam::996905175585:role/PocketGHARole
- name: Build and Push Production Docker Image
id: prod-docker-build
uses: ./.github/actions/containerize
uses: pocket/pocket-monorepo/.github/actions/containerize@github-actions
with:
docker-repo-name: "${{inputs.production-aws-registry }}/${{ format(inputs.docker-repo-name-pattern, 'prod') }}"
app-path: ${{inputs.app-path}}
Expand All @@ -163,7 +163,7 @@ jobs:
scope: ${{inputs.scope}}
push: true
- name: Code Deploy Docker Image
uses: ./.github/actions/ecs-codedeploy
uses: pocket/pocket-monorepo/.github/actions/ecs-codedeploy@github-actions
if: fromJSON(inputs.terraform-output).ecs-task-containerName.value != ''
with:
docker-image-name: ${{steps.prod-docker-build.outputs.docker-image-name}}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/reuse-build-and-push-lambda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Build Lambda
uses: ./.github/actions/build-lambda
uses: pocket/pocket-monorepo/.github/actions/build-lambda@github-actions
with:
sentry-project: ${{inputs['sentry-project']}}
sentry-org: ${{inputs['sentry-org']}}
Expand All @@ -72,7 +72,7 @@ jobs:
aws-region: us-east-1
role-to-assume: arn:aws:iam::410318598490:role/PocketGHARole
- name: Build Lambda
uses: ./.github/actions/build-lambda
uses: pocket/pocket-monorepo/.github/actions/build-lambda@github-actions
with:
sentry-project: ${{inputs['sentry-project']}}
sentry-org: ${{inputs['sentry-org']}}
Expand All @@ -81,7 +81,7 @@ jobs:
s3-bucket: ${{ format(inputs.s3-bucket-pattern, 'dev') }}
s3-key: ${{ inputs.s3-key }}
- name: CodeDeploy Lambda
uses: ./.github/actions/lambda-codedeploy
uses: pocket/pocket-monorepo/.github/actions/lambda-codedeploy@github-actions
with:
s3-bucket: ${{ format(inputs.s3-bucket-pattern, 'dev') }}
s3-key: ${{ inputs.s3-key }}
Expand All @@ -101,7 +101,7 @@ jobs:
aws-region: us-east-1
role-to-assume: arn:aws:iam::996905175585:role/PocketGHARole
- name: Build Lambda
uses: ./.github/actions/build-lambda
uses: pocket/pocket-monorepo/.github/actions/build-lambda@github-actions
with:
sentry-project: ${{inputs['sentry-project']}}
sentry-org: ${{inputs['sentry-org']}}
Expand All @@ -110,7 +110,7 @@ jobs:
s3-bucket: ${{ format(inputs.s3-bucket-pattern, 'prod') }}
s3-key: ${{ inputs.s3-key }}
- name: CodeDeploy Lambda
uses: ./.github/actions/lambda-codedeploy
uses: pocket/pocket-monorepo/.github/actions/lambda-codedeploy@github-actions
with:
s3-bucket: ${{ format(inputs.s3-bucket-pattern, 'prod') }}
s3-key: ${{ inputs.s3-key }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/reuse-infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout Actions
uses: actions/checkout@v4
# Get the AWS credentials
- name: AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -42,11 +44,10 @@ jobs:
role-to-assume: arn:aws:iam::996905175585:role/PocketGHARole
- name: Execute CDKTF
if: inputs.raw-terraform == false
uses: ./.github/actions/cdktf
uses: pocket/pocket-monorepo/.github/actions/cdktf@github-actions
with:
stack-output-path: ${{inputs['stack-output-path']}}
scope: ${{inputs['scope']}}
# TODO: Change this to production when ready
environment: production
behavior: plan
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -55,11 +56,10 @@ jobs:

- name: Execute Raw Terraform
if: inputs.raw-terraform == true
uses: ./.github/actions/raw-terraform
uses: pocket/pocket-monorepo/.github/actions/raw-terraform@github-actions
with:
stack-output-path: ${{inputs['stack-output-path']}}
scope: ${{inputs['scope']}}
# TODO: Change this to production when ready
environment: production
behavior: plan
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
role-to-assume: arn:aws:iam::996905175585:role/PocketGHARole
- name: Execute Development CDKTF
if: inputs.raw-terraform == false && github.ref == 'refs/heads/dev'
uses: ./.github/actions/cdktf
uses: pocket/pocket-monorepo/.github/actions/cdktf@github-actions
with:
stack-output-path: ${{inputs['stack-output-path']}}
scope: ${{inputs['scope']}}
Expand All @@ -99,7 +99,7 @@ jobs:
terraform-token: ${{ secrets.TERRAFORM_TOKEN }}
- name: Execute Developement Raw Terraform
if: inputs.raw-terraform == true && github.ref == 'refs/heads/dev'
uses: ./.github/actions/raw-terraform
uses: pocket/pocket-monorepo/.github/actions/raw-terraform@github-actions
with:
stack-output-path: ${{inputs['stack-output-path']}}
scope: ${{inputs['scope']}}
Expand All @@ -111,7 +111,7 @@ jobs:

- name: Execute Production CDKTF
if: inputs.raw-terraform == false && github.ref == 'refs/heads/main'
uses: ./.github/actions/cdktf
uses: pocket/pocket-monorepo/.github/actions/cdktf@github-actions
with:
stack-output-path: ${{inputs['stack-output-path']}}
scope: ${{inputs['scope']}}
Expand All @@ -123,7 +123,7 @@ jobs:

- name: Execute Production Raw Terraform
if: inputs.raw-terraform == true && github.ref == 'refs/heads/main'
uses: ./.github/actions/raw-terraform
uses: pocket/pocket-monorepo/.github/actions/raw-terraform@github-actions
with:
stack-output-path: ${{inputs['stack-output-path']}}
scope: ${{inputs['scope']}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reuse-test-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

# While we wait for docker compose to be healthy we install node and needed packages for this service
- name: Install pnpm & node
uses: ./.github/actions/install-pnpm-and-node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@github-actions
with:
scope: ${{ inputs['scope'] }}

Expand Down
2 changes: 1 addition & 1 deletion infrastructure/account-data-deleter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/account-delete-monitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/annotations-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/braze/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/client-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/feature-flags/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/fxa-webhook-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/image-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/instant-sync-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/list-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/parser-graphql-wrapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/pocket-event-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/push-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/sendgrid-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/shareable-lists-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/shared-snowplow-consumer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/shares-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/transactional-emails/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
Loading

0 comments on commit 61cd110

Please sign in to comment.