Skip to content

Commit dc3262d

Browse files
pin actions to commit SHAs in workflows (#744)
* fix basic validation with npm command * Revert "fix basic validation with npm command" This reverts commit 27a0803. * pin workflow actions to full commit SHAs with patch * update cooldown * update redundant global.json test and rollForward fields * update cooldown for npm section
1 parent 95a3f8b commit dc3262d

5 files changed

Lines changed: 34 additions & 62 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ updates:
1212
# Check the npm registry for updates every day (weekdays)
1313
schedule:
1414
interval: 'weekly'
15+
cooldown:
16+
default-days: 7
1517

1618
# Enable version updates for GitHub Actions
1719
- package-ecosystem: 'github-actions'
@@ -20,3 +22,5 @@ updates:
2022
directory: '/'
2123
schedule:
2224
interval: 'weekly'
25+
cooldown:
26+
default-days: 7

‎.github/workflows/e2e-tests.yml‎

Lines changed: 26 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
]
2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v6
30+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
3131
- name: Clear toolcache
3232
shell: pwsh
3333
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -57,7 +57,7 @@ jobs:
5757
]
5858
steps:
5959
- name: Checkout
60-
uses: actions/checkout@v6
60+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
6161
- name: Clear toolcache
6262
shell: pwsh
6363
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -92,7 +92,7 @@ jobs:
9292
]
9393
steps:
9494
- name: Checkout
95-
uses: actions/checkout@v6
95+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
9696
- name: Clear toolcache
9797
shell: pwsh
9898
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -123,7 +123,7 @@ jobs:
123123
]
124124
steps:
125125
- name: Checkout
126-
uses: actions/checkout@v6
126+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
127127
- name: Clear toolcache
128128
shell: pwsh
129129
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -149,7 +149,7 @@ jobs:
149149
]
150150
steps:
151151
- name: Checkout
152-
uses: actions/checkout@v6
152+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
153153
- name: Clear toolcache
154154
shell: pwsh
155155
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -180,7 +180,7 @@ jobs:
180180
]
181181
steps:
182182
- name: Checkout
183-
uses: actions/checkout@v6
183+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
184184
- name: Clear toolcache
185185
shell: pwsh
186186
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -208,7 +208,7 @@ jobs:
208208
]
209209
steps:
210210
- name: Checkout
211-
uses: actions/checkout@v6
211+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
212212
- name: Clear toolcache
213213
shell: pwsh
214214
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -239,15 +239,15 @@ jobs:
239239
]
240240
steps:
241241
- name: Checkout
242-
uses: actions/checkout@v6
242+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
243243
- name: Clear toolcache
244244
shell: pwsh
245245
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
246246
- name: Write global.json
247247
shell: bash
248248
run: |
249249
mkdir subdirectory
250-
echo '{"sdk":{"version": "9.0.308","rollForward": "latestFeature"}}' > ./subdirectory/global.json
250+
echo '{"sdk":{"version": "9.0.308"}}' > ./subdirectory/global.json
251251
- name: Setup dotnet
252252
uses: ./
253253
with:
@@ -265,7 +265,7 @@ jobs:
265265
operating-system: [ubuntu-latest, windows-latest, macos-latest]
266266
steps:
267267
- name: Checkout
268-
uses: actions/checkout@v6
268+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
269269
- name: Clear toolcache
270270
shell: pwsh
271271
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -290,7 +290,7 @@ jobs:
290290
operating-system: [ubuntu-latest, windows-latest, macos-latest]
291291
steps:
292292
- name: Checkout
293-
uses: actions/checkout@v6
293+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
294294
- name: Clear toolcache
295295
shell: pwsh
296296
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -315,7 +315,7 @@ jobs:
315315
operating-system: [ubuntu-latest, windows-latest, macos-latest]
316316
steps:
317317
- name: Checkout
318-
uses: actions/checkout@v6
318+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
319319
- name: Clear toolcache
320320
shell: pwsh
321321
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -332,38 +332,6 @@ jobs:
332332
shell: pwsh
333333
run: __tests__/verify-dotnet.ps1 -Patterns "^10.0.1(?!00)"
334334

335-
test-setup-global-json-only:
336-
runs-on: ${{ matrix.operating-system }}
337-
strategy:
338-
fail-fast: false
339-
matrix:
340-
operating-system:
341-
[
342-
ubuntu-22.04,
343-
ubuntu-latest,
344-
windows-latest,
345-
macos-latest,
346-
macos-15-intel
347-
]
348-
steps:
349-
- name: Checkout
350-
uses: actions/checkout@v6
351-
- name: Clear toolcache
352-
shell: pwsh
353-
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
354-
- name: Write global.json
355-
shell: bash
356-
run: |
357-
mkdir subdirectory
358-
echo '{"sdk":{"version": "10.0.101","rollForward": "latestFeature"}}' > ./subdirectory/global.json
359-
- name: Setup dotnet
360-
uses: ./
361-
with:
362-
global-json-file: ./subdirectory/global.json
363-
- name: Verify dotnet
364-
shell: pwsh
365-
run: __tests__/verify-dotnet.ps1 -Patterns "^10.0"
366-
367335
test-global-json-with-comments:
368336
runs-on: ${{ matrix.operating-system }}
369337
strategy:
@@ -379,15 +347,15 @@ jobs:
379347
]
380348
steps:
381349
- name: Checkout
382-
uses: actions/checkout@v6
350+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
383351
- name: Clear toolcache
384352
shell: pwsh
385353
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
386354
- name: Write global.json
387355
shell: bash
388356
run: |
389357
mkdir subdirectory
390-
echo '/* should support comments */ {"sdk":{"version": "10.0.101","rollForward": "latestFeature"}} // should support comments' > ./subdirectory/global.json
358+
echo '/* should support comments */ {"sdk":{"version": "10.0.101"}} // should support comments' > ./subdirectory/global.json
391359
- name: Setup dotnet
392360
uses: ./
393361
with:
@@ -411,7 +379,7 @@ jobs:
411379
]
412380
steps:
413381
- name: Checkout
414-
uses: actions/checkout@v6
382+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
415383
- name: Clear toolcache
416384
shell: pwsh
417385
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -442,7 +410,7 @@ jobs:
442410
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
443411
steps:
444412
- name: Checkout
445-
uses: actions/checkout@v6
413+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
446414
- name: Clear toolcache
447415
shell: pwsh
448416
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -480,7 +448,7 @@ jobs:
480448
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
481449
steps:
482450
- name: Checkout
483-
uses: actions/checkout@v6
451+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
484452
- name: Clear toolcache
485453
shell: pwsh
486454
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -514,7 +482,7 @@ jobs:
514482
]
515483
steps:
516484
- name: Checkout
517-
uses: actions/checkout@v6
485+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
518486
- name: Clear toolcache
519487
shell: pwsh
520488
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -547,7 +515,7 @@ jobs:
547515
]
548516
steps:
549517
- name: Checkout
550-
uses: actions/checkout@v6
518+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
551519
- name: Clear toolcache
552520
shell: pwsh
553521
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -587,7 +555,7 @@ jobs:
587555
http_proxy: http://squid-proxy:3128
588556
steps:
589557
- name: Checkout
590-
uses: actions/checkout@v6
558+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
591559
- name: Clear toolcache
592560
shell: pwsh
593561
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -610,7 +578,7 @@ jobs:
610578
no_proxy: github.com,download.visualstudio.microsoft.com,api.nuget.org,builds.dotnet.microsoft.com,ci.dot.net
611579
steps:
612580
- name: Checkout
613-
uses: actions/checkout@v6
581+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
614582
- name: Clear toolcache
615583
shell: pwsh
616584
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -642,7 +610,7 @@ jobs:
642610
higher-version: ['10.0.101']
643611
steps:
644612
- name: Checkout
645-
uses: actions/checkout@v6
613+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
646614
- name: Clear toolcache
647615
shell: pwsh
648616
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -671,7 +639,7 @@ jobs:
671639
[ubuntu-latest, windows-latest, macos-15-intel, macos-latest]
672640
steps:
673641
- name: Checkout
674-
uses: actions/checkout@v6
642+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
675643
- name: Clear toolcache
676644
shell: pwsh
677645
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -710,7 +678,7 @@ jobs:
710678

711679
steps:
712680
- name: Checkout
713-
uses: actions/checkout@v6
681+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
714682

715683
- name: Clear toolcache
716684
shell: pwsh
@@ -738,7 +706,7 @@ jobs:
738706
operating-system: [ubuntu-latest]
739707
steps:
740708
- name: Checkout
741-
uses: actions/checkout@v6
709+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
742710
- name: Clear toolcache
743711
shell: pwsh
744712
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -758,7 +726,7 @@ jobs:
758726
operating-system: [macos-latest]
759727
steps:
760728
- name: Checkout
761-
uses: actions/checkout@v6
729+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
762730
- name: Clear toolcache
763731
shell: pwsh
764732
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}

‎.github/workflows/publish-immutable-actions.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
- name: Checking out
17-
uses: actions/checkout@v6
17+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
1818
- name: Publish
1919
id: publish
20-
uses: actions/[email protected]
20+
uses: actions/publish-immutable-action@4bc8754ffc40f27910afb20287dbbbb675a4e978 # v0.0.4

‎.github/workflows/release-new-action-version.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
steps:
2424
- name: Update the ${{ env.TAG_NAME }} tag
2525
id: update-major-tag
26-
uses: actions/[email protected]
26+
uses: actions/publish-action@23f4c6f12633a2da8f44938b71fde9afec138fb4 # v0.4.0
2727
with:
2828
source-tag: ${{ env.TAG_NAME }}
2929
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}

‎.github/workflows/test-dotnet.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
dotnet-version: ['8.0', '9.0', '10.0']
2929
steps:
3030
- name: Checkout
31-
uses: actions/checkout@v6
31+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
3232
- name: Clear toolcache
3333
shell: pwsh
3434
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}

0 commit comments

Comments
 (0)