|
9 | 9 | schedule: |
10 | 10 | - cron: "0 0 * * 1" |
11 | 11 | workflow_dispatch: |
12 | | - inputs: |
13 | | - sigstore: |
14 | | - description: "Run a sigstore signing dry run, without deploying anything." |
15 | | - type: boolean |
16 | | - default: true |
17 | 12 | permissions: read-all |
18 | 13 | jobs: |
19 | 14 | hotspot-ea: |
@@ -255,58 +250,3 @@ jobs: |
255 | 250 | git add --all |
256 | 251 | git commit -m "[publish] Start next development iteration $NEXT_SNAPSHOT_VERSION" |
257 | 252 | git push --follow-tags |
258 | | - sigstore-dry-run: |
259 | | - name: Sigstore (dry run) |
260 | | - runs-on: ubuntu-24.04 |
261 | | - if: github.event_name == 'workflow_dispatch' && inputs.sigstore |
262 | | - permissions: |
263 | | - contents: read |
264 | | - id-token: write |
265 | | - steps: |
266 | | - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
267 | | - - uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 |
268 | | - with: |
269 | | - java-version: 8 |
270 | | - distribution: temurin |
271 | | - architecture: x64 |
272 | | - cache: maven |
273 | | - - uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2 |
274 | | - with: |
275 | | - cosign-release: v3.0.6 |
276 | | - # Installs into the local repository only, such that nothing is ever deployed by this job. |
277 | | - - name: Build and sign without deploying |
278 | | - run: ./mvnw install -DskipTests -Pextras -Psigstore |
279 | | - # Each bundle must verify against the artifact that is installed next to it, which is the |
280 | | - # file that a release would deploy. This catches a bundle that signs the wrong file. |
281 | | - - name: Verify bundles against the installed artifacts |
282 | | - run: | |
283 | | - set -euo pipefail |
284 | | - VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout) |
285 | | - echo "Verifying sigstore bundles for version ${VERSION}" |
286 | | - COUNT=0 |
287 | | - FAILED=0 |
288 | | - while IFS= read -r bundle; do |
289 | | - COUNT=$((COUNT + 1)) |
290 | | - target="${bundle%.sigstore.json}" |
291 | | - if [ ! -f "${target}" ]; then |
292 | | - echo "::error::no artifact is installed for bundle ${bundle}" |
293 | | - FAILED=$((FAILED + 1)) |
294 | | - continue |
295 | | - fi |
296 | | - if cosign verify-blob \ |
297 | | - --bundle "${bundle}" \ |
298 | | - --certificate-identity-regexp "^https://github.com/${GITHUB_REPOSITORY}/" \ |
299 | | - --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \ |
300 | | - "${target}" > /dev/null 2>&1; then |
301 | | - echo "ok $(basename "${target}")" |
302 | | - else |
303 | | - echo "::error::signature does not verify for ${target}" |
304 | | - FAILED=$((FAILED + 1)) |
305 | | - fi |
306 | | - done < <(find ~/.m2/repository/net/bytebuddy -path "*/${VERSION}/*" -name "*.sigstore.json" | sort) |
307 | | - echo "Checked ${COUNT} bundle(s) with ${FAILED} failure(s)" |
308 | | - if [ "${COUNT}" -eq 0 ]; then |
309 | | - echo "::error::no sigstore bundles were created" |
310 | | - exit 1 |
311 | | - fi |
312 | | - [ "${FAILED}" -eq 0 ] |
0 commit comments