File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4949 dotnet tool install CycloneDX
5050
5151 - name : Generate SBOM for latest tag on branch
52+ id : generate_sbom
5253 run : |
5354 git fetch --tags
5455 BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
@@ -62,17 +63,15 @@ jobs:
6263
6364 mkdir -p sbom/$VERSION
6465 dotnet tool run dotnet-CycloneDX OpenCode/OpenCode.csproj -o sbom/$VERSION -f json
65-
66+
67+ # Set step output
68+ echo "version=$VERSION" >> $GITHUB_OUTPUT
69+
6670 - name : Commit SBOM
6771 env :
6872 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6973 run : |
70- # Use same version logic as SBOM generation
71- BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
72- VERSION=$(git tag --merged $BRANCH_NAME --sort=-v:refname | head -n1)
73- if [ -z "$VERSION" ]; then
74- VERSION=$(git rev-parse --short HEAD)
75- fi
74+ VERSION=${{ steps.generate_sbom.outputs.version }}
7675 echo "Committing SBOM for version: $VERSION"
7776
7877 git config user.name "github-actions[bot]"
8281 git push origin HEAD
8382
8483
84+
8585 - name : Pack
8686 if : matrix.dotnet-version == '9.x'
8787 run : dotnet pack --configuration Release --no-build --output ./nupkg
You can’t perform that action at this time.
0 commit comments