|
51 | 51 | ${{ "{{ runner.os }}" }}-python-${{ "{{ env.python_version }}" }}-pipenv- |
52 | 52 | ${{ "{{ runner.os }}" }}-python- |
53 | 53 | - name: Install the dependencies |
54 | | - run: python -m pip install --upgrade pipenv |
| 54 | + run: | |
| 55 | + python -m pip install --upgrade pipenv |
| 56 | + mkdir "${RUNNER_TEMP}/bin" |
| 57 | + curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b "${RUNNER_TEMP}/bin" |
| 58 | + chmod +x "${RUNNER_TEMP}/bin/syft" |
| 59 | + curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b "${RUNNER_TEMP}/bin" |
| 60 | + chmod +x "${RUNNER_TEMP}/bin/grype" |
| 61 | + echo "${RUNNER_TEMP}/bin" >> "${GITHUB_PATH}" |
55 | 62 | - name: Install Task |
56 | 63 | uses: arduino/setup-task@v1 |
57 | 64 | - name: Initialize the repo |
|
68 | 75 | run: task -v test |
69 | 76 | env: |
70 | 77 | PLATFORM: ${{ "{{ matrix.platform }}" }} |
| 78 | + - name: Generate the SBOMs |
| 79 | + run: task -v sbom |
| 80 | + env: |
| 81 | + PLATFORM: ${{ "{{ matrix.platform }}" }} |
| 82 | + - name: Upload the SBOMs |
| 83 | + uses: actions/upload-artifact@v3 |
| 84 | + with: |
| 85 | + name: SBOM |
| 86 | + path: sbom.*.json |
| 87 | + if-no-files-found: error |
| 88 | + - name: Generate vuln scan results |
| 89 | + run: task -v vulnscan |
| 90 | + env: |
| 91 | + PLATFORM: ${{ "{{ matrix.platform }}" }} |
| 92 | + - name: Upload the vuln scan results |
| 93 | + uses: actions/upload-artifact@v3 |
| 94 | + with: |
| 95 | + name: Vulns |
| 96 | + path: vulns.*.json |
| 97 | + if-no-files-found: error |
71 | 98 | {%- if cookiecutter.versioning == "CalVer" %} |
72 | 99 | bump-version: |
73 | 100 | name: Bump version |
@@ -109,13 +136,21 @@ jobs: |
109 | 136 | BRANCH="$(git branch --show-current)" |
110 | 137 | git push --atomic origin "${BRANCH}" "${TAG}" |
111 | 138 | echo "tag=${TAG}" >> "${GITHUB_OUTPUT}" |
| 139 | + - name: Download the SBOMs and Vuln scan results |
| 140 | + uses: actions/download-artifact@v3 |
| 141 | + with: |
| 142 | + path: ${{ "{{ runner.temp }}" }} |
112 | 143 | - name: Publish the release to GitHub |
113 | 144 | uses: softprops/action-gh-release@v1 |
114 | 145 | env: |
115 | 146 | GITHUB_TOKEN: ${{ "{{ secrets.GITHUB_TOKEN }}" }} |
116 | 147 | with: |
117 | 148 | name: ${{ "{{ steps.bump-version.outputs.tag }}" }} |
118 | 149 | tag_name: ${{ "{{ steps.bump-version.outputs.tag }}" }} |
| 150 | + generate_release_notes: true |
| 151 | + files: | |
| 152 | + ${{ "{{ runner.temp }}" }}/Vulns/vulns.*.json |
| 153 | + ${{ "{{ runner.temp }}" }}/SBOM/sbom.*.json |
119 | 154 | draft: false |
120 | 155 | prerelease: false |
121 | 156 | {%- endif -%} |
|
0 commit comments