File tree Expand file tree Collapse file tree 5 files changed +21
-1
lines changed Expand file tree Collapse file tree 5 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ class Result:
1919 skipped : int = - 1
2020 rekor2_verify : bool = False
2121 rekor2_sign : bool = False
22+ conformance_action_version : str = "unknown"
2223 client_sha : str = ""
2324 client_sha_url : str = ""
2425 workflow_run : str = ""
@@ -36,6 +37,10 @@ def __init__(self, report_path: Path):
3637 return # no results found
3738 self .results_found = True
3839
40+ self .conformance_action_version = data .get ("environment" , {}).get (
41+ "conformance_action_version" , "unknown"
42+ )
43+
3944 summary = data ["summary" ]
4045 self .total = summary ["total" ]
4146 self .passed = summary .get ("passed" , 0 ) + summary .get ("subtests passed" , 0 )
@@ -81,6 +86,7 @@ def _generate_html(results: list[Result]):
8186 <th>Xfailed</th>
8287 <th>Rekor v2 verify</th>
8388 <th>Rekor v2 sign</th>
89+ <th>Action Version</th>
8490 </tr>
8591 </thead>
8692 <tbody>
@@ -110,6 +116,7 @@ def _generate_html(results: list[Result]):
110116 <td>{ res .xfailed if res .results_found else "" } </td>
111117 <td>{ "✅" if res .rekor2_verify else "❌" } </td>
112118 <td>{ "✅" if res .rekor2_sign else "❌" } </td>
119+ <td>{ res .conformance_action_version } </td>
113120 </tr>
114121 """
115122 html += """
Original file line number Diff line number Diff line change 44#
55# all state is passed in as environment variables
66
7+ import json
78import os
89import sys
910from pathlib import Path
@@ -29,6 +30,9 @@ def _debug(msg):
2930def _sigstore_conformance (environment : str ) -> int :
3031 args = ["--json-report" , "--json-report-file=conformance-report.json" , "--durations=0" ]
3132
33+ version = os .getenv ("GHA_SIGSTORE_CONFORMANCE_ACTION_VERSION" , "unknown" )
34+ args .extend (["--metadata" , "conformance_action_version" , version ])
35+
3236 if _DEBUG :
3337 args .extend (["-s" , "-vv" , "--showlocals" ])
3438
Original file line number Diff line number Diff line change 5252 echo "::endgroup::"
5353 shell : bash
5454
55+ - name : Get action version
56+ id : get_action_version
57+ run : echo "action_version=$(git describe --tags --always)" >> $GITHUB_OUTPUT
58+ shell : bash
59+
5560 - name : Run sigstore-conformance
5661 id : sigstore-conformance
5762 run : |
6772 GHA_SIGSTORE_CONFORMANCE_CLIENT_SHA_URL : " ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}"
6873 GHA_SIGSTORE_CONFORMANCE_WORKFLOW_RUN : " ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
6974 GHA_SIGSTORE_CONFORMANCE_SELFTEST_BIN : " ${{ github.workspace }}/sigstore-conformance-selftest-env/bin/sigstore"
75+ GHA_SIGSTORE_CONFORMANCE_ACTION_VERSION : " ${{ steps.get_action_version.outputs.action_version }}"
7076 shell : bash
7177
7278 - name : Upload conformance result
Original file line number Diff line number Diff line change 11pytest==8.4.2
22pytest-json-report==1.5.0
3+ pytest-metadata==3.1.1
34pytest-subtests==0.15.0
45requests==2.32.5
56cryptography==46.0.3
Original file line number Diff line number Diff line change @@ -603,7 +603,9 @@ pytest-json-report==1.5.0 \
603603pytest-metadata == 3.1.1 \
604604 --hash =sha256:c8e0844db684ee1c798cfa38908d20d67d0463ecb6137c72e91f418558dd5f4b \
605605 --hash =sha256:d2a29b0355fbc03f168aa96d41ff88b1a3b44a3b02acbe491801c98a048017c8
606- # via pytest-json-report
606+ # via
607+ # -r requirements.in
608+ # pytest-json-report
607609pytest-subtests == 0.15.0 \
608610 --hash =sha256:cb495bde05551b784b8f0b8adfaa27edb4131469a27c339b80fd8d6ba33f887c \
609611 --hash =sha256:da2d0ce348e1f8d831d5a40d81e3aeac439fec50bd5251cbb7791402696a9493
You can’t perform that action at this time.
0 commit comments