Skip to content

Commit 1be2d45

Browse files
committed
chore: [] add copilot setup (NPM)
1 parent 618a3d2 commit 1be2d45

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "Copilot Setup Steps"
2+
3+
# Automatically run the setup steps when they are changed to allow for easy validation, and
4+
# allow manual testing through the repository's "Actions" tab
5+
on:
6+
workflow_dispatch:
7+
push:
8+
paths:
9+
- .github/workflows/copilot-setup-steps.yml
10+
pull_request:
11+
paths:
12+
- .github/workflows/copilot-setup-steps.yml
13+
14+
jobs:
15+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
16+
copilot-setup-steps:
17+
runs-on: ubuntu-latest
18+
19+
# Set the permissions to the lowest permissions possible needed for your steps.
20+
# Copilot will be given its own token for its operations.
21+
permissions:
22+
contents: read # allows cloning
23+
packages: read # allows reading private contentful packages
24+
25+
# You can define any steps you want, and they will run before the agent starts.
26+
# If you do not check out your code, Copilot will do this for you.
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v5
30+
31+
- name: Set up Node.js
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version-file: '.nvmrc'
35+
cache: "npm"
36+
37+
- name: set up global .npmrc
38+
run: |
39+
echo '//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN_PACKAGES_READONLY}' >> $HOME/.npmrc
40+
echo 'ignore-scripts=true' >> $HOME/.npmrc
41+
42+
- name: Install JavaScript dependencies
43+
run: npm ci
44+
env:
45+
GITHUB_TOKEN_PACKAGES_READONLY: ${{ github.token }}

0 commit comments

Comments
 (0)