| name: "On Comment" |
| |
| on: |
| issue_comment: |
| types: [created] |
| |
| permissions: |
| contents: write |
| issues: write |
| pull-requests: write |
| |
| jobs: |
| # This job always runs to prevent GHA from marking the run as failed when |
| # all other jobs are skipped. |
| noop: |
| runs-on: ubuntu-latest |
| steps: |
| - run: echo "No-op" |
| |
| parse_comment: |
| runs-on: ubuntu-latest |
| if: | |
| github.event.comment.author_association == 'OWNER' || |
| github.event.comment.author_association == 'MEMBER' || |
| github.event.comment.author_association == 'COLLABORATOR' |
| outputs: |
| command: ${{ steps.parse.outputs.command }} |
| issue_number: ${{ steps.parse.outputs.issue_number }} |
| pr_number: ${{ steps.parse.outputs.pr_number }} |
| backports: ${{ steps.parse.outputs.backports }} |
| steps: |
| - uses: actions/checkout@v7 |
| - uses: actions/setup-python@v5 |
| with: |
| python-version: "3.14" |
| - name: Parse comment |
| id: parse |
| env: |
| COMMENT_BODY: ${{ github.event.comment.body }} |
| IS_PR: "${{ github.event.issue.pull_request != null }}" |
| EVENT_NUMBER: "${{ github.event.issue.number }}" |
| HAS_RELEASE_LABEL: "${{ contains(github.event.issue.labels.*.name, 'type: release') }}" |
| HAS_BACKPORT_LABEL: "${{ contains(github.event.issue.labels.*.name, 'type: backport-pr') }}" |
| COMMENT_ID: "${{ github.event.comment.id }}" |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| run: .github/workflows/on_comment.py |
| |
| call_create_rc: |
| needs: parse_comment |
| if: needs.parse_comment.outputs.command == 'create-rc' |
| uses: ./.github/workflows/release_create_rc.yaml |
| with: |
| issue: ${{ needs.parse_comment.outputs.issue_number }} |
| comment_id: "${{ github.event.comment.id }}" |
| secrets: inherit |
| |
| call_prepare_complete: |
| needs: parse_comment |
| if: needs.parse_comment.outputs.command == 'prepare-complete' |
| uses: ./.github/workflows/release_complete_prepare.yaml |
| with: |
| pr: ${{ needs.parse_comment.outputs.pr_number }} |
| issue: ${{ needs.parse_comment.outputs.issue_number }} |
| secrets: inherit |
| |
| call_create_release_branch: |
| needs: parse_comment |
| if: needs.parse_comment.outputs.command == 'create-release-branch' |
| uses: ./.github/workflows/release_create_release_branch.yaml |
| with: |
| issue: ${{ needs.parse_comment.outputs.issue_number }} |
| secrets: inherit |
| |
| call_prepare: |
| needs: parse_comment |
| if: needs.parse_comment.outputs.command == 'prepare' |
| uses: ./.github/workflows/release_prepare.yaml |
| with: |
| issue: ${{ needs.parse_comment.outputs.issue_number }} |
| secrets: inherit |
| |
| call_add_backports: |
| needs: parse_comment |
| if: | |
| needs.parse_comment.outputs.command == 'add-backports' || |
| needs.parse_comment.outputs.command == 'pr-backport' |
| uses: ./.github/workflows/release_add_backports.yaml |
| with: |
| prs: ${{ needs.parse_comment.outputs.command == 'pr-backport' && needs.parse_comment.outputs.pr_number || needs.parse_comment.outputs.backports }} |
| issue: ${{ needs.parse_comment.outputs.issue_number }} |
| secrets: inherit |
| |
| call_process_backports_after_add: |
| needs: [parse_comment, call_add_backports] |
| if: needs.parse_comment.outputs.command == 'add-backports' |
| uses: ./.github/workflows/release_process_backports.yaml |
| with: |
| issue: ${{ needs.parse_comment.outputs.issue_number }} |
| comment_id: "${{ github.event.comment.id }}" |
| secrets: inherit |
| |
| call_process_backports_only: |
| needs: parse_comment |
| if: needs.parse_comment.outputs.command == 'process-backports' |
| uses: ./.github/workflows/release_process_backports.yaml |
| with: |
| issue: ${{ needs.parse_comment.outputs.issue_number }} |
| comment_id: "${{ github.event.comment.id }}" |
| secrets: inherit |
| |
| call_promote: |
| needs: parse_comment |
| if: needs.parse_comment.outputs.command == 'promote' |
| uses: ./.github/workflows/release_promote.yaml |
| with: |
| issue: ${{ needs.parse_comment.outputs.issue_number }} |
| secrets: inherit |
| |
| call_backport_prepare: |
| needs: parse_comment |
| if: needs.parse_comment.outputs.command == 'backport-prepare' |
| uses: ./.github/workflows/backport_prepare.yaml |
| with: |
| issue: ${{ needs.parse_comment.outputs.issue_number }} |
| secrets: inherit |
| |
| call_backport_create_releases: |
| needs: parse_comment |
| if: needs.parse_comment.outputs.command == 'backport-create-releases' |
| uses: ./.github/workflows/backport_create_releases.yaml |
| with: |
| issue: ${{ needs.parse_comment.outputs.issue_number }} |
| secrets: inherit |