ci: take ownership of pyproject.toml, add dynamic versioning and poe task composition #13
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: Slash Command Dispatch | |
| on: | |
| issue_comment: | |
| types: [created] | |
| permissions: | |
| contents: read | |
| issues: write | |
| pull-requests: write | |
| actions: write | |
| jobs: | |
| slash-command-dispatch: | |
| name: Slash Command Dispatch | |
| # Only allow slash commands on pull requests (not on issues) | |
| if: ${{ github.event.issue.pull_request }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Authenticate as GitHub App | |
| uses: actions/create-github-app-token@v3 | |
| id: app-token | |
| with: | |
| app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }} | |
| private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }} | |
| - name: Slash Command Dispatch | |
| id: dispatch | |
| uses: peter-evans/slash-command-dispatch@9bdcd7914ec1b75590b790b844aa3b8eee7c683a # v5.0.2 | |
| with: | |
| repository: ${{ github.repository }} | |
| token: ${{ steps.app-token.outputs.token }} | |
| dispatch-type: workflow | |
| issue-type: pull-request | |
| commands: | | |
| generate | |
| pre-release | |
| static-args: | | |
| pr=${{ github.event.issue.number }} | |
| comment-id=${{ github.event.comment.id }} | |
| # Only run for users with 'write' permission on the main repository | |
| permission: write | |
| - name: Edit comment with error message | |
| if: steps.dispatch.outputs.error-message | |
| uses: peter-evans/create-or-update-comment@v5 | |
| with: | |
| comment-id: ${{ github.event.comment.id }} | |
| body: | | |
| > Error: ${{ steps.dispatch.outputs.error-message }} |