@grafana/create-plugin 5.22.1 → 5.22.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v5.22.2 (Tue Jun 10 2025)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Chore: Fix zizmor issues in template workflows [#1823](https://github.com/grafana/plugin-tools/pull/1823) ([@academo](https://github.com/academo))
6
+
7
+ #### Authors: 1
8
+
9
+ - Esteban Beltran ([@academo](https://github.com/academo))
10
+
11
+ ---
12
+
1
13
  # v5.22.1 (Tue May 20 2025)
2
14
 
3
15
  #### 🐛 Bug Fix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/create-plugin",
3
- "version": "5.22.1",
3
+ "version": "5.22.2",
4
4
  "repository": {
5
5
  "directory": "packages/create-plugin",
6
6
  "url": "https://github.com/grafana/plugin-tools"
@@ -63,5 +63,5 @@
63
63
  "engines": {
64
64
  "node": ">=20"
65
65
  },
66
- "gitHead": "5b72cd15a18b24d218e2815eb42fa36c2d31b9b7"
66
+ "gitHead": "886afb85d590f2644808aa7b16f7330121a1db11"
67
67
  }
@@ -21,5 +21,7 @@ jobs:
21
21
  steps:
22
22
  - name: Checkout repository
23
23
  uses: actions/checkout@v4
24
+ with:
25
+ persist-credentials: false
24
26
 
25
- - uses: grafana/plugin-actions/bundle-size@main
27
+ - uses: grafana/plugin-actions/bundle-size@main # zizmor: ignore[unpinned-uses] provided by grafana
@@ -11,15 +11,12 @@ on:
11
11
  - master
12
12
  - main
13
13
 
14
- permissions:
15
- contents: write
16
- id-token: write
17
- pull-requests: write
18
-
19
14
  jobs:
20
15
  build:
21
16
  name: Build, lint and unit tests
22
17
  runs-on: ubuntu-latest
18
+ permissions:
19
+ contents: read
23
20
  outputs:
24
21
  plugin-id: $\{{ steps.metadata.outputs.plugin-id }}
25
22
  plugin-version: $\{{ steps.metadata.outputs.plugin-version }}
@@ -29,6 +26,8 @@ jobs:
29
26
  GRAFANA_ACCESS_POLICY_TOKEN: $\{{ secrets.GRAFANA_ACCESS_POLICY_TOKEN }}
30
27
  steps:
31
28
  - uses: actions/checkout@v4
29
+ with:
30
+ persist-credentials: false
32
31
  {{#if_eq packageManagerName "pnpm"}}
33
32
  # pnpm action uses the packageManager field in package.json to
34
33
  # understand which version to install.
@@ -68,14 +67,14 @@ jobs:
68
67
 
69
68
  - name: Test backend
70
69
  if: steps.check-for-backend.outputs.has-backend == 'true'
71
- uses: magefile/mage-action@v3
70
+ uses: magefile/mage-action@6f50bbb8ea47d56e62dee92392788acbc8192d0b # v3.1.0
72
71
  with:
73
72
  version: latest
74
73
  args: coverage
75
74
 
76
75
  - name: Build backend
77
76
  if: steps.check-for-backend.outputs.has-backend == 'true'
78
- uses: magefile/mage-action@v3
77
+ uses: magefile/mage-action@6f50bbb8ea47d56e62dee92392788acbc8192d0b # v3.1.0
79
78
  with:
80
79
  version: latest
81
80
  args: buildAll
@@ -108,14 +107,19 @@ jobs:
108
107
  - name: Package plugin
109
108
  id: package-plugin
110
109
  run: |
111
- mv dist $\{{ steps.metadata.outputs.plugin-id }}
112
- zip $\{{ steps.metadata.outputs.archive }} $\{{ steps.metadata.outputs.plugin-id }} -r
110
+ mv dist ${PLUGIN_ID}
111
+ zip ${ARCHIVE} ${PLUGIN_ID} -r
112
+ env:
113
+ ARCHIVE: $\{{ steps.metadata.outputs.archive }}
114
+ PLUGIN_ID: $\{{ steps.metadata.outputs.plugin-id }}
113
115
 
114
116
  - name: Check plugin.json
115
117
  run: |
116
118
  docker run --pull=always \
117
- -v $PWD/$\{{ steps.metadata.outputs.archive }}:/archive.zip \
119
+ -v $PWD/${ARCHIVE}:/archive.zip \
118
120
  grafana/plugin-validator-cli -analyzer=metadatavalid /archive.zip
121
+ env:
122
+ ARCHIVE: $\{{ steps.metadata.outputs.archive }}
119
123
 
120
124
  - name: Archive Build
121
125
  uses: actions/upload-artifact@v4
@@ -127,6 +131,8 @@ jobs:
127
131
  resolve-versions:
128
132
  name: Resolve e2e images
129
133
  runs-on: ubuntu-latest
134
+ permissions:
135
+ contents: read
130
136
  timeout-minutes: 3
131
137
  needs: build
132
138
  if: $\{{ needs.build.outputs.has-e2e == 'true' }}
@@ -135,13 +141,20 @@ jobs:
135
141
  steps:
136
142
  - name: Checkout
137
143
  uses: actions/checkout@v4
144
+ with:
145
+ persist-credentials: false
146
+
138
147
  - name: Resolve Grafana E2E versions
139
148
  id: resolve-versions
140
- uses: grafana/plugin-actions/e2e-version@main
149
+ uses: grafana/plugin-actions/e2e-version@main # zizmor: ignore[unpinned-uses] provided by grafana
141
150
 
142
151
  playwright-tests:
143
152
  needs: [resolve-versions, build]
144
153
  timeout-minutes: 15
154
+ permissions:
155
+ contents: read
156
+ id-token: write
157
+ pull-requests: write
145
158
  strategy:
146
159
  fail-fast: false
147
160
  matrix:
@@ -150,6 +163,8 @@ jobs:
150
163
  runs-on: ubuntu-latest
151
164
  steps:
152
165
  - uses: actions/checkout@v4
166
+ with:
167
+ persist-credentials: false
153
168
 
154
169
  - name: Download plugin
155
170
  uses: actions/download-artifact@v4
@@ -182,7 +197,7 @@ jobs:
182
197
  ANONYMOUS_AUTH_ENABLED=false DEVELOPMENT=false GRAFANA_VERSION=$\{{ matrix.GRAFANA_IMAGE.VERSION }} GRAFANA_IMAGE=$\{{ matrix.GRAFANA_IMAGE.NAME }} docker compose up -d
183
198
 
184
199
  - name: Wait for grafana server
185
- uses: grafana/plugin-actions/wait-for-grafana@main
200
+ uses: grafana/plugin-actions/wait-for-grafana@main # zizmor: ignore[unpinned-uses] provided by grafana
186
201
  with:
187
202
  url: http://localhost:3000/login
188
203
 
@@ -194,7 +209,7 @@ jobs:
194
209
  run: {{ packageManagerName }} run e2e
195
210
 
196
211
  - name: Upload e2e test summary
197
- uses: grafana/plugin-actions/playwright-gh-pages/upload-report-artifacts@main
212
+ uses: grafana/plugin-actions/playwright-gh-pages/upload-report-artifacts@main # zizmor: ignore[unpinned-uses] provided by grafana
198
213
  if: $\{{ always() && !cancelled() }}
199
214
  with:
200
215
  upload-report: false
@@ -220,12 +235,19 @@ jobs:
220
235
 
221
236
  publish-report:
222
237
  if: $\{{ always() && !cancelled() }}
238
+ permissions:
239
+ contents: write
240
+ id-token: write
241
+ pull-requests: write
223
242
  needs: [playwright-tests]
224
243
  runs-on: ubuntu-latest
225
244
  steps:
226
245
  - uses: actions/checkout@v4
246
+ with:
247
+ # required for playwright-gh-pages
248
+ persist-credentials: true
227
249
  - name: Publish report
228
- uses: grafana/plugin-actions/playwright-gh-pages/deploy-report-pages@main
250
+ uses: grafana/plugin-actions/playwright-gh-pages/deploy-report-pages@main # zizmor: ignore[unpinned-uses] provided by grafana
229
251
  with:
230
252
  github-token: $\{{ secrets.GITHUB_TOKEN }}
231
253
 
@@ -18,7 +18,7 @@ jobs:
18
18
  release:
19
19
  runs-on: ubuntu-latest
20
20
  steps:
21
- - uses: grafana/plugin-actions/create-plugin-update@main
21
+ - uses: grafana/plugin-actions/create-plugin-update@main # zizmor: ignore[unpinned-uses] provided by grafana
22
22
  # Uncomment to use a fine-grained personal access token instead of default github token
23
23
  # (For more info on how to generate the token see https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)
24
24
  # with:
@@ -4,20 +4,28 @@ on: [pull_request]
4
4
  jobs:
5
5
  compatibilitycheck:
6
6
  runs-on: ubuntu-latest
7
+ permissions:
8
+ contents: read
7
9
  steps:
8
10
  - uses: actions/checkout@v4
11
+ with:
12
+ persist-credentials: false
13
+
9
14
  {{#if_eq packageManagerName "pnpm"}}
10
15
  # pnpm action uses the packageManager field in package.json to
11
16
  # understand which version to install.
12
- - uses: pnpm/action-setup@v2
17
+ - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
13
18
  {{/if_eq}}
19
+
14
20
  - name: Setup Node.js environment
15
- uses: actions/setup-node@v4
21
+ uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
16
22
  with:
17
23
  node-version: '22'
18
24
  cache: '{{ packageManagerName }}'
25
+
19
26
  - name: Install dependencies
20
27
  run: {{ packageManagerInstallCmd }}
28
+
21
29
  - name: Build plugin
22
30
  run: {{ packageManagerName }} run build
23
31
  - name: Compatibility check
@@ -17,7 +17,10 @@ jobs:
17
17
  runs-on: ubuntu-latest
18
18
  steps:
19
19
  - uses: actions/checkout@v4
20
- - uses: grafana/plugin-actions/build-plugin@main
20
+ with:
21
+ persist-credentials: false
22
+
23
+ - uses: grafana/plugin-actions/build-plugin@main # zizmor: ignore[unpinned-uses] provided by grafana
21
24
  # Uncomment to enable plugin signing
22
25
  # (For more info on how to generate the access policy token see https://grafana.com/developers/plugin-tools/publish-a-plugin/sign-a-plugin#generate-an-access-policy-token)
23
26
  #with: