@@ -10,16 +10,23 @@ concurrency:
1010 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1111 cancel-in-progress : true
1212
13+ permissions : {}
14+
1315jobs :
1416 lint-and-test :
1517 runs-on : ubuntu-latest
18+ permissions :
19+ contents : read
20+ name : " Lint and Test"
1621
1722 steps :
1823 - name : Checkout
19- uses : actions/checkout@v4
24+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
25+ with :
26+ persist-credentials : false
2027
2128 - name : Base Setup
22- uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
29+ uses : jupyterlab/maintainer-tools/.github/actions/base-setup@affc83be6020d529b9368cd4d63e467877606600 # v1
2330
2431 - name : Install dependencies
2532 run : python -m pip install -U "jupyterlab>=4.0.0,<5"
@@ -36,20 +43,23 @@ jobs:
3643 jlpm run test
3744
3845 build :
46+ name : Build JupyterLite extension
3947 runs-on : ubuntu-latest
4048
4149 steps :
4250 - name : Checkout
43- uses : actions/checkout@v4
51+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
52+ with :
53+ persist-credentials : false
4454
4555 - name : Base Setup
46- uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
56+ uses : jupyterlab/maintainer-tools/.github/actions/base-setup@affc83be6020d529b9368cd4d63e467877606600 # v1
4757
4858 - name : Install dependencies
4959 run : python -m pip install -U "jupyterlab>=4.0.0,<5"
5060
5161 - name : Restore Playwright browsers cache
52- uses : actions/cache@v4
62+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
5363 with :
5464 path : /home/runner/.cache/ms-playwright
5565 key : playwright-browsers-${{ runner.os }}-v1
@@ -74,29 +84,35 @@ jobs:
7484 pip uninstall -y "jupytereverywhere" jupyterlab
7585
7686 - name : Upload extension packages
77- uses : actions/upload-artifact@v4
87+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
7888 with :
7989 name : extension-artifacts
8090 path : dist/jupytereverywhere*
8191 if-no-files-found : error
8292
8393 lite :
94+ name : Build JupyterLite app
8495 needs : build
8596 runs-on : ubuntu-latest
97+ permissions :
98+ contents : read
99+ pull-requests : write
86100
87101 steps :
88102 - name : Checkout
89- uses : actions/checkout@v4
103+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
104+ with :
105+ persist-credentials : false
90106
91107 - name : Setup Python
92- uses : actions/setup-python@v5
108+ uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
93109 with :
94110 python-version : ' 3.11'
95111
96112 - name : Install micromamba
97113 uses : mamba-org/setup-micromamba@b09ef9b599704322748535812ca03efb2625677b # v2.0.5
98114
99- - uses : actions/download-artifact@v4
115+ - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
100116 with :
101117 name : extension-artifacts
102118
@@ -123,14 +139,14 @@ jobs:
123139 jlpm build:all
124140
125141 - name : Upload artifact
126- uses : actions/upload-artifact@v4
142+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
127143 with :
128144 name : lite-app
129145 path : ./dist
130146 if-no-files-found : error
131147
132148 - name : Upload GitHub Pages artifact
133- uses : actions/upload-pages-artifact@v3
149+ uses : actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
134150 with :
135151 path : ./dist
136152
@@ -146,7 +162,7 @@ jobs:
146162
147163
148164 - name : Upload artifact
149- uses : actions/upload-artifact@v4
165+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
150166 with :
151167 name : lite-app-test
152168 path : ./dist-test
@@ -168,6 +184,7 @@ jobs:
168184 echo 'Press ctrl + c to stop the server.' >> $GITHUB_STEP_SUMMARY
169185
170186 deploy :
187+ name : Deploy to GitHub Pages and Netlify
171188 needs : lite
172189 if : github.ref == 'refs/heads/main'
173190 permissions :
@@ -182,7 +199,7 @@ jobs:
182199 steps :
183200 - name : Deploy to GitHub Pages
184201 id : deployment
185- uses : actions/deploy-pages@v4
202+ uses : actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
186203
187204 deploy-netlify :
188205 needs : lite
@@ -191,13 +208,13 @@ jobs:
191208 runs-on : ubuntu-latest
192209 steps :
193210 - name : Download lite app
194- uses : actions/download-artifact@v4
211+ uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
195212 with :
196213 name : lite-app
197214 path : dist
198215
199216 - name : Publish to Netlify
200- uses : netlify/actions/cli@3185065f4ab2f6df6f2ef41ee013626e1c02a426
217+ uses : netlify/actions/cli@3185065f4ab2f6df6f2ef41ee013626e1c02a426 # 3185065f4ab2f6df6f2ef41ee013626e1c02a426
201218 with :
202219 args : deploy --dir=dist --prod
203220 env :
@@ -206,16 +223,17 @@ jobs:
206223
207224
208225 test_isolated :
226+ name : Isolated extension test
209227 needs : build
210228 runs-on : ubuntu-latest
211229
212230 steps :
213231 - name : Install Python
214- uses : actions/setup-python@v5
232+ uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
215233 with :
216234 python-version : ' 3.9'
217235 architecture : ' x64'
218- - uses : actions/download-artifact@v4
236+ - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
219237 with :
220238 name : extension-artifacts
221239 - name : Install and Test
@@ -242,13 +260,15 @@ jobs:
242260
243261 steps :
244262 - name : Checkout
245- uses : actions/checkout@v4
263+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
264+ with :
265+ persist-credentials : false
246266
247267 - name : Base Setup
248- uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
268+ uses : jupyterlab/maintainer-tools/.github/actions/base-setup@affc83be6020d529b9368cd4d63e467877606600 # v1
249269
250270 - name : Download lite app (test mode)
251- uses : actions/download-artifact@v4
271+ uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
252272 with :
253273 name : lite-app-test
254274 path : dist
@@ -266,7 +286,7 @@ jobs:
266286 run : jlpm install
267287
268288 - name : Set up browser cache
269- uses : actions/cache@v4
289+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
270290 with :
271291 path : |
272292 ${{ github.workspace }}/pw-browsers
@@ -283,7 +303,7 @@ jobs:
283303
284304 - name : Upload Playwright Test report
285305 if : always()
286- uses : actions/upload-artifact@v4
306+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
287307 with :
288308 name : jupytereverywhere-playwright-tests
289309 path : |
0 commit comments