File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 77
88permissions :
99 contents : read
10- id-token : write # required for keyless signing
10+ id-token : write # required for GitHub OIDC keyless signing
1111 attestations : write
1212
1313jobs :
@@ -32,20 +32,29 @@ jobs:
3232 - name : Build with Maven
3333 run : mvn -B -DskipTests package
3434
35- # 4️⃣ Install Cosign (required internally by provenance action)
35+ # 4️⃣ Ensure artifact exists (fail if missing)
36+ - name : Check JAR exists
37+ run : |
38+ ART=target/demo-oidc-java-1.0.0.jar
39+ if [ ! -f "$ART" ]; then
40+ echo "ERROR: $ART not found!"
41+ exit 1
42+ fi
43+
44+ # 5️⃣ Install Cosign (required internally by provenance action)
3645 - name : Install Cosign
37463847 with :
3948 cosign-release : " v3.0.2"
4049
41- # 5️⃣ Generate and sign SLSA provenance for the JAR
50+ # 6️⃣ Generate and sign SLSA provenance for the JAR
4251 - name : Generate and sign build provenance
4352 uses : actions/attest-build-provenance@v1
4453 with :
4554 subject-path : target/demo-oidc-java-1.0.0.jar
4655 github-token : ${{ secrets.GITHUB_TOKEN }}
4756
48- # 6️⃣ Upload artifacts (JAR + signed provenance)
57+ # 7️⃣ Upload artifacts (JAR + signed provenance)
4958 - name : Upload artifacts
5059 uses : actions/upload-artifact@v4
5160 with :
You can’t perform that action at this time.
0 commit comments