fix: tighten workflow permissions, add security hardening, and fix uv tool invocations #269
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Release | |
| on: | |
| workflow_dispatch: | |
| pull_request_target: | |
| types: [closed] | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| release: | |
| permissions: | |
| contents: write | |
| pull-requests: read | |
| uses: github-community-projects/ospo-reusable-workflows/.github/workflows/release.yaml@3b691dff6b68489c8548e1295d125c93c9c29a4e | |
| with: | |
| publish: true | |
| release-config-name: release-drafter.yml | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| release_image: | |
| needs: release | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| attestations: write | |
| uses: github-community-projects/ospo-reusable-workflows/.github/workflows/release-image.yaml@3b691dff6b68489c8548e1295d125c93c9c29a4e | |
| with: | |
| image-name: ${{ github.repository }} | |
| full-tag: ${{ needs.release.outputs.full-tag }} | |
| short-tag: ${{ needs.release.outputs.short-tag }} | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| image-registry: ghcr.io | |
| image-registry-username: ${{ github.actor }} | |
| image-registry-password: ${{ secrets.GITHUB_TOKEN }} | |
| release_discussion: | |
| needs: release | |
| permissions: | |
| contents: read | |
| discussions: write | |
| uses: github-community-projects/ospo-reusable-workflows/.github/workflows/release-discussion.yaml@3b691dff6b68489c8548e1295d125c93c9c29a4e | |
| with: | |
| full-tag: ${{ needs.release.outputs.full-tag }} | |
| body: ${{ needs.release.outputs.body }} | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| discussion-repository-id: ${{ secrets.RELEASE_DISCUSSION_REPOSITORY_ID }} | |
| discussion-category-id: ${{ secrets.RELEASE_DISCUSSION_CATEGORY_ID }} |