Skip to content

Commit

Permalink
Ensure GitHub actions are using the same Node.js version and NPM cache (
Browse files Browse the repository at this point in the history
  • Loading branch information
wcalderipe authored Jun 10, 2024
1 parent cb60072 commit a4bce48
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/armory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ jobs:
--health-retries 5
steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Add private .npmrc
run: echo "${{ secrets.NPMRC }}" > .npmrc

- name: Install Node.js
- name: Install node.js
uses: actions/setup-node@v4
with:
node-version: '21'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/packages-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ jobs:
- name: Add private .npmrc
run: echo "${{ secrets.NPMRC }}" > .npmrc

- name: install node.js
- name: Install node.js
uses: actions/setup-node@v4
with:
node-version: '21'
cache: 'npm'
# IMPORTANT: Must point to GitHub packages registry because we
# publish through it, not NPM directly.
registry-url: https://npm.pkg.github.com/

- name: Install dependencies
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Add private .npmrc
run: echo "${{ secrets.NPMRC }}" > .npmrc

- name: Install Node.js
uses: actions/setup-node@v3
- name: Install node.js
uses: actions/setup-node@v4
with:
node-version: '20.4.0'
node-version: '21'
cache: 'npm'

- name: Install dependencies
run: |
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/policy-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,24 @@ jobs:
--health-retries 5
steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Add private .npmrc
run: echo "${{ secrets.NPMRC }}" > .npmrc

- name: Install Node.js
- name: Install node.js
uses: actions/setup-node@v4
with:
node-version: '21'
cache: 'npm'

- name: Install dependencies
run: |
make install/ci
- name: Install Open Policy Agent CLI
uses: open-policy-agent/setup-opa@v2
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/vault.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ jobs:
--health-retries 5
steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Add private .npmrc
run: echo "${{ secrets.NPMRC }}" > .npmrc

- name: Install Node.js
- name: Install node.js
uses: actions/setup-node@v4
with:
node-version: '21'
Expand Down

0 comments on commit a4bce48

Please sign in to comment.