Skip to content

Commit

Permalink
fix install args
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcasey committed Sep 7, 2024
1 parent 3771435 commit 474333f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/actions/deploy_production/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ runs:
# we need to bring back node_modules which includes tsconfig-paths which is used by CDK files
- name: Install dependencies
uses: ./.github/actions/install
with:
app_name: ${{ inputs.app_name }}

- name: Set the docker compose env variables
uses: mikefarah/yq@master
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/deploy_staging/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ runs:
# we need to bring back node_modules which includes tsconfig-paths which is used by CDK files
- name: Install dependencies
uses: ./.github/actions/install
with:
app_name: ${{ inputs.app_name }}

- name: Replace env_var with staging settings
shell: bash
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ inputs:
commit_core_pkg_upgrade:
description: 'Whether commit the update to core package back to branch'
required: false
npm_install_args:
description: 'Example: -w app/websockets'
app_name:
description: ''
required: false
use_github_core_branch:
description: |
Expand Down Expand Up @@ -44,13 +44,13 @@ runs:
./node_modules
./apps/*/node_modules
./packages/*/node_modules
key: nodemodule-cache-${{ hashFiles('package-lock.json') }}-${{ hashFiles('patches/**.patch', 'prisma/schema.prisma') }}
key: nodemodule-cache-${{ hashFiles('package-lock.json') }}-${{ hashFiles('patches/**.patch', 'prisma/schema.prisma') }}-${{ inputs.app_name || '' }}

- name: Install npm dependencies
shell: bash
if: steps.restore_node_modules.outputs.cache-hit != 'true'
# This is a temporary step while we figure out a way to ensure compatibility with lens protocol which currently needs ethers-v5
run: npm ci --no-audit --no-fund --force ${{ inputs.npm_install_args }}
run: npm ci --no-audit --no-fund --force ${{ inputs.app_name && `--include-workspace-root -w apps/${inputs.app_name}` || '' }}

# If installing specific version of core via npmjs
- name: Upgrade Core package to version ${{ inputs.core_pkg_version }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/deploy_ceramic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Install dependencies
uses: ./.github/actions/install
with:
npm_install_args: --include-workspace-root -w apps/ceramic
app_name: ceramic
core_pkg_version: ${{ inputs.core_pkg_version }}
commit_core_pkg_upgrade: true

Expand All @@ -89,6 +89,8 @@ jobs:

- name: Install dependencies
uses: ./.github/actions/install
with:
app_name: ceramic

- name: Restore app from cache
uses: ./.github/actions/build_app
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/deploy_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
- name: Install dependencies
uses: ./.github/actions/install
with:
npm_install_args: --include-workspace-root -w apps/cron
app_name: cron
core_pkg_version: ${{ inputs.core_pkg_version }}
commit_core_pkg_upgrade: true

Expand Down Expand Up @@ -114,6 +114,8 @@ jobs:

- name: Restore dependencies from cache
uses: ./.github/actions/install
with:
app_name: cron

- name: Setup test database
run: npx dotenv -e .env.test.local -- npm run prisma:reset
Expand Down Expand Up @@ -149,6 +151,8 @@ jobs:

- name: Install dependencies
uses: ./.github/actions/install
with:
app_name: cron

- name: Restore app from cache
uses: ./.github/actions/build_app
Expand Down Expand Up @@ -182,6 +186,8 @@ jobs:

- name: Install dependencies
uses: ./.github/actions/install
with:
app_name: cron

- name: Calculate Build ID
id: get_build_id
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_websockets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Install dependencies
uses: ./.github/actions/install
with:
npm_install_args: --include-workspace-root -w apps/cron
app_name: websockets
core_pkg_version: ${{ inputs.core_pkg_version }}
commit_core_pkg_upgrade: true

Expand Down

0 comments on commit 474333f

Please sign in to comment.