Skip to content

Commit

Permalink
chore(ci): extract cached-node-modules action (#2876)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Schueren <[email protected]>
  • Loading branch information
dreamorosi and am29d authored Aug 5, 2024
1 parent e542d11 commit 3feba28
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 59 deletions.
48 changes: 0 additions & 48 deletions .github/actions/cached-node-modules/action.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/make-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: |
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
- name: Setup dependencies
uses: ./.github/actions/cached-node-modules
uses: aws-powertools/actions/.github/actions/cached-node-modules@d406bac5563f1d8c793519a3eedfe620f6a14872
- name: Publish to npm
run: |
NPM_CONFIG_PROVENANCE=true npx lerna publish from-package --git-head ${{ github.sha }} --yes
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/make-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
node-version: "20"
cache: "npm"
- name: Setup dependencies
uses: ./.github/actions/cached-node-modules
uses: aws-powertools/actions/.github/actions/cached-node-modules@d406bac5563f1d8c793519a3eedfe620f6a14872
- name: Version
id: bump-version
run: npx lerna version --conventional-commits --no-git-tag-version --no-push --no-commit-hooks --yes
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_layer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
with:
node-version: "20"
- name: Setup dependencies
uses: ./.github/actions/cached-node-modules
uses: aws-powertools/actions/.github/actions/cached-node-modules@d406bac5563f1d8c793519a3eedfe620f6a14872
- name: CDK build
run: npm run cdk -w layers -- synth --context PowertoolsPackageVersion=${{ inputs.latest_published_version }} -o cdk.out
- name: Zip output
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/reusable-run-linting-check-and-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
node-version: ${{ matrix.version }}
cache: "npm"
- name: Setup dependencies
uses: ./.github/actions/cached-node-modules
uses: aws-powertools/actions/.github/actions/cached-node-modules@d406bac5563f1d8c793519a3eedfe620f6a14872
with:
nodeVersion: ${{ matrix.version }}
- name: Run linting
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
node-version: 20
cache: "npm"
- name: Setup dependencies
uses: ./.github/actions/cached-node-modules
uses: aws-powertools/actions/.github/actions/cached-node-modules@d406bac5563f1d8c793519a3eedfe620f6a14872
- name: Run linting
run: npm run lint
- name: Run tests
Expand All @@ -89,7 +89,7 @@ jobs:
node-version: 20
cache: "npm"
- name: Setup dependencies
uses: ./.github/actions/cached-node-modules
uses: aws-powertools/actions/.github/actions/cached-node-modules@d406bac5563f1d8c793519a3eedfe620f6a14872
- name: Run linting
run: npm run lint -w layers
- name: Run tests
Expand All @@ -107,7 +107,7 @@ jobs:
node-version: 20
cache: "npm"
- name: Setup dependencies
uses: ./.github/actions/cached-node-modules
uses: aws-powertools/actions/.github/actions/cached-node-modules@d406bac5563f1d8c793519a3eedfe620f6a14872
- name: Run linting
run: npm run lint -w examples/snippets
check-docs:
Expand All @@ -123,6 +123,6 @@ jobs:
node-version: 20
cache: "npm"
- name: Setup dependencies
uses: ./.github/actions/cached-node-modules
uses: aws-powertools/actions/.github/actions/cached-node-modules@d406bac5563f1d8c793519a3eedfe620f6a14872
- name: Run linting
run: npm run lint:markdown
2 changes: 1 addition & 1 deletion .github/workflows/reusable_deploy_layer_stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
with:
node-version: "20"
- name: Setup dependencies
uses: ./.github/actions/cached-node-modules
uses: aws-powertools/actions/.github/actions/cached-node-modules@d406bac5563f1d8c793519a3eedfe620f6a14872
- name: Download artifact
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_publish_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
node-version: "20"
cache: "npm"
- name: Setup dependencies
uses: ./.github/actions/cached-node-modules
uses: aws-powertools/actions/.github/actions/cached-node-modules@d406bac5563f1d8c793519a3eedfe620f6a14872
- name: Set up Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
with:
node-version: '20'
- name: Setup dependencies
uses: ./.github/actions/cached-node-modules
uses: aws-powertools/actions/.github/actions/cached-node-modules@d406bac5563f1d8c793519a3eedfe620f6a14872
with:
nodeVersion: '20'
- name: Setup AWS credentials
Expand Down

0 comments on commit 3feba28

Please sign in to comment.