|
8 | 8 | paths: |
9 | 9 | - ".github/workflows/release.yml" |
10 | 10 | - "api/*.py" |
11 | | - - "templates/*.j2" |
12 | 11 | - "pyproject.toml" |
13 | 12 | - "Dockerfile" |
14 | 13 |
|
|
29 | 28 | permissions: |
30 | 29 | id-token: write |
31 | 30 | contents: write |
| 31 | + attestations: write |
32 | 32 | environment: |
33 | 33 | name: pypi |
34 | 34 | url: https://pypi.org/project/Wakatime-Leaderboards/ |
|
89 | 89 | pip install build==1.3.0 |
90 | 90 | python -m build |
91 | 91 |
|
| 92 | + - name: Generate Artifact Attestation |
| 93 | + uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0 |
| 94 | + with: |
| 95 | + subject-name: waka-leaderboards-python-dist |
| 96 | + subject-path: dist/* |
| 97 | + push-to-registry: true |
| 98 | + |
92 | 99 | - name: Publish to PyPI |
93 | 100 | uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 |
94 | 101 | with: |
@@ -133,7 +140,7 @@ jobs: |
133 | 140 | if: github.event_name != 'pull_request' |
134 | 141 | uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62 # v3.10.0 |
135 | 142 | with: |
136 | | - cosign-release: "v2.6.0" |
| 143 | + cosign-release: "v3.0.1" |
137 | 144 |
|
138 | 145 | - name: Setup Docker Buildx |
139 | 146 | uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 |
@@ -184,12 +191,20 @@ jobs: |
184 | 191 | DIGEST: ${{ steps.push.outputs.digest }} |
185 | 192 | run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} |
186 | 193 |
|
187 | | - - name: Generate Artifact Attestation |
188 | | - uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0 |
| 194 | + # - name: Generate Artifact Attestation |
| 195 | + # uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0 |
| 196 | + # with: |
| 197 | + # subject-name: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }} |
| 198 | + # subject-digest: ${{ steps.push.outputs.digest }} |
| 199 | + # push-to-registry: true |
| 200 | + |
| 201 | + - name: Generate SLSA3 Provenance |
| 202 | + uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v2.1.0 |
189 | 203 | with: |
190 | | - subject-name: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }} |
191 | | - subject-digest: ${{ steps.push.outputs.digest }} |
192 | | - push-to-registry: true |
| 204 | + image: ${{ needs.push.outputs.image }} |
| 205 | + digest: ${{ needs.push.outputs.digest }} |
| 206 | + registry-username: ${{ github.actor }} |
| 207 | + registry-password: ${{ secrets.GITHUB_TOKEN }} |
193 | 208 |
|
194 | 209 | - name: Docker Scout Scan |
195 | 210 | uses: docker/scout-action@f8c776824083494ab0d56b8105ba2ca85c86e4de # v1.18.2 |
|
0 commit comments