Skip to content

Commit

Permalink
fix(local): ensuring github actions use the local files
Browse files Browse the repository at this point in the history
  • Loading branch information
bassrock committed Jan 7, 2025
1 parent 536c371 commit 2dca3ef
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 27 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: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@main
uses: ./.github/actions/install-pnpm-and-node
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
2 changes: 1 addition & 1 deletion .github/actions/cdktf/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ runs:
${{ runner.os }}-tfenv-
- name: Install pnpm & node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@main
uses: ./.github/actions/install-pnpm-and-node
with:
scope: ${{ inputs['scope'] }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
fetch-depth: 2

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

# https://github.com/pnpm/pnpm/issues/3141#issuecomment-1305563972
- name: Set publishing config
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: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@main
uses: ./.github/actions/install-pnpm-and-node

- 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: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@main
uses: ./.github/actions/install-pnpm-and-node

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

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

- 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: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@main
uses: ./.github/actions/install-pnpm-and-node
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: pocket/pocket-monorepo/.github/actions/containerize@main
uses: ./.github/actions/containerize
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: pocket/pocket-monorepo/.github/actions/containerize@main
uses: ./.github/actions/containerize
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: pocket/pocket-monorepo/.github/actions/ecs-codedeploy@main
uses: ./.github/actions/ecs-codedeploy
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: pocket/pocket-monorepo/.github/actions/containerize@main
uses: ./.github/actions/containerize
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: pocket/pocket-monorepo/.github/actions/ecs-codedeploy@main
uses: ./.github/actions/ecs-codedeploy
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: pocket/pocket-monorepo/.github/actions/build-lambda@main
uses: ./.github/actions/build-lambda
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: pocket/pocket-monorepo/.github/actions/build-lambda@main
uses: ./.github/actions/build-lambda
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: pocket/pocket-monorepo/.github/actions/lambda-codedeploy@main
uses: ./.github/actions/lambda-codedeploy
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: pocket/pocket-monorepo/.github/actions/build-lambda@main
uses: ./.github/actions/build-lambda
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: pocket/pocket-monorepo/.github/actions/lambda-codedeploy@main
uses: ./.github/actions/lambda-codedeploy
with:
s3-bucket: ${{ format(inputs.s3-bucket-pattern, 'prod') }}
s3-key: ${{ inputs.s3-key }}
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/reuse-infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ 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 @@ -44,7 +42,7 @@ jobs:
role-to-assume: arn:aws:iam::996905175585:role/PocketGHARole
- name: Execute CDKTF
if: inputs.raw-terraform == false
uses: pocket/pocket-monorepo/.github/actions/cdktf@main
uses: ./.github/actions/cdktf
with:
stack-output-path: ${{inputs['stack-output-path']}}
scope: ${{inputs['scope']}}
Expand All @@ -56,7 +54,7 @@ jobs:

- name: Execute Raw Terraform
if: inputs.raw-terraform == true
uses: pocket/pocket-monorepo/.github/actions/raw-terraform@main
uses: ./.github/actions/raw-terraform
with:
stack-output-path: ${{inputs['stack-output-path']}}
scope: ${{inputs['scope']}}
Expand Down Expand Up @@ -88,7 +86,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: pocket/pocket-monorepo/.github/actions/cdktf@main
uses: ./.github/actions/cdktf
with:
stack-output-path: ${{inputs['stack-output-path']}}
scope: ${{inputs['scope']}}
Expand All @@ -99,7 +97,7 @@ jobs:
terraform-token: ${{ secrets.TERRAFORM_TOKEN }}
- name: Execute Developement Raw Terraform
if: inputs.raw-terraform == true && github.ref == 'refs/heads/dev'
uses: pocket/pocket-monorepo/.github/actions/raw-terraform@main
uses: ./.github/actions/raw-terraform
with:
stack-output-path: ${{inputs['stack-output-path']}}
scope: ${{inputs['scope']}}
Expand All @@ -111,7 +109,7 @@ jobs:

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

- name: Execute Production Raw Terraform
if: inputs.raw-terraform == true && github.ref == 'refs/heads/main'
uses: pocket/pocket-monorepo/.github/actions/raw-terraform@main
uses: ./.github/actions/raw-terraform
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: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@main
uses: ./.github/actions/install-pnpm-and-node
with:
scope: ${{ inputs['scope'] }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/transactional-emails.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: ./.github/workflows/reuse-build-and-push-lambda.yml
needs: [infrastructure]
with:
scope: '@server/transactional-emails'
scope: '@lambda/transactional-emails'
sentry-project: transactional-emails
s3-bucket-pattern: pocket-transactionalemails-{0}-sqs-event-consumer
codedeploy-app-name-pattern: TransactionalEmails-{0}-Sqs-Event-Consumer-Lambda
Expand Down

0 comments on commit 2dca3ef

Please sign in to comment.