Skip to content

Commit d8aaf89

Browse files
ci: pin dependencies and specify permissions in the pipeline (#25)
PR-URL: #25
1 parent 0b1fe5a commit d8aaf89

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/ci.yml

+12-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ on:
44
- pull_request
55
- push
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
test:
912
runs-on: ubuntu-20.04
13+
permissions:
14+
contents: read # for actions/checkout to fetch code
15+
checks: write # for coverallsapp/github-action to create new checks
1016
strategy:
1117
matrix:
1218
name:
@@ -124,7 +130,7 @@ jobs:
124130
node-version: "21.7"
125131

126132
steps:
127-
- uses: actions/checkout@v2
133+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
128134

129135
- name: Install Node.js ${{ matrix.node-version }}
130136
shell: bash -eo pipefail -l {0}
@@ -195,7 +201,7 @@ jobs:
195201
run: npm run lint
196202

197203
- name: Collect code coverage
198-
uses: coverallsapp/github-action@master
204+
uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 #v2.2.3
199205
if: steps.list_env.outputs.nyc != ''
200206
with:
201207
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -205,9 +211,12 @@ jobs:
205211
coverage:
206212
needs: test
207213
runs-on: ubuntu-latest
214+
permissions:
215+
contents: read # for actions/checkout to fetch code
216+
checks: write # for coverallsapp/github-action to create new checks
208217
steps:
209218
- name: Upload code coverage
210-
uses: coverallsapp/github-action@master
219+
uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 #v2.2.3
211220
with:
212221
github-token: ${{ secrets.github_token }}
213222
parallel-finished: true

0 commit comments

Comments
 (0)