Skip to content

Commit 4cc888c

Browse files
authored
Address issues raised by plumber (#103)
* Pin actions to commit SHA * npm audit fix * Update publish workflow to use app token * Update common-utils
1 parent c15c4d6 commit 4cc888c

4 files changed

Lines changed: 329 additions & 289 deletions

File tree

.github/workflows/bat.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ jobs:
88
name: Build and Test
99
runs-on: ubuntu-24.04
1010
steps:
11-
- uses: actions/checkout@v6
12-
- uses: actions/setup-node@v6
11+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
12+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
1313
with:
1414
node-version: 24
1515
- name: Perform npm tasks
1616
run: npm run ci
17-
- uses: actions/upload-artifact@v7
17+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
1818
with:
1919
name: built-action
2020
path: |
@@ -29,11 +29,11 @@ jobs:
2929
matrix:
3030
os: [ubuntu-latest, windows-latest, macos-latest, macos-14]
3131
steps:
32-
- uses: actions/download-artifact@v8
32+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
3333
with:
3434
name: built-action
3535
- name: Perform 'setup-matlab'
36-
uses: matlab-actions/setup-matlab@v3
36+
uses: matlab-actions/setup-matlab@a0180c939fb1a28de13f44f7b778b912384ced1f # v3.0.1
3737
with:
3838
products: |
3939
MATLAB_Test
@@ -63,7 +63,7 @@ jobs:
6363
grep "1 Incomplete" output.log
6464
shell: bash
6565
- name: Generate Model
66-
uses: matlab-actions/run-command@v3
66+
uses: matlab-actions/run-command@bcd446a219949c24051c1d04a4b4e0274c42f23b # v3.2.0
6767
with:
6868
command: cd('sample'),createSampleModel('temp_model'),sltest.testmanager.createTestsFromModel('sltestfile', 'temp_model');
6969
- name: Set up diary for logging
@@ -111,18 +111,18 @@ jobs:
111111
needs: bat
112112
runs-on: ubuntu-latest
113113
steps:
114-
- uses: actions/download-artifact@v8
114+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
115115
with:
116116
name: built-action
117117
- name: Perform 'setup-matlab' without MATLAB Test
118-
uses: matlab-actions/setup-matlab@v3
118+
uses: matlab-actions/setup-matlab@a0180c939fb1a28de13f44f7b778b912384ced1f # v3.0.1
119119
- name: Run MATLAB Tests without MATLAB Test # Test Case 1: Without MATLAB Test, no view is shown
120120
uses: ./
121121
with:
122122
source-folder: sample
123123
code-coverage-metric-level: mcdc
124124
- name: Perform 'setup-matlab' with MATLAB Test
125-
uses: matlab-actions/setup-matlab@v3
125+
uses: matlab-actions/setup-matlab@a0180c939fb1a28de13f44f7b778b912384ced1f # v3.0.1
126126
with:
127127
products: |
128128
MATLAB_Test

.github/workflows/publish.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,19 @@ jobs:
1515
outputs:
1616
tag: ${{ steps.update-package-version.outputs.version }}
1717
steps:
18-
- uses: actions/checkout@v6
18+
- uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2.2.2
19+
id: app-token
20+
with:
21+
app-id: ${{ vars.RELEASE_APP_ID }}
22+
private-key: ${{ secrets.RELEASE_APP_KEY }}
23+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
24+
with:
25+
token: ${{ steps.app-token.outputs.token }}
1926
- name: Configure git
2027
run: |
2128
git config user.name 'Release Action'
2229
git config user.email '<>'
23-
- uses: actions/setup-node@v6
30+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
2431
with:
2532
node-version: 24
2633

@@ -41,7 +48,7 @@ jobs:
4148
run: npm run ci
4249

4350
- name: Generate signed attestations for workflow artifacts
44-
uses: actions/attest@v4
51+
uses: actions/attest@508db95dd578ae2727ebd6217d5ba78e4fbda05d # v4.2.1
4552
with:
4653
subject-path: dist/bin/**/run-matlab-command*
4754

0 commit comments

Comments
 (0)