Files
rancher-docs/.github/workflows/create-issue.yml
2025-07-22 18:26:55 +02:00

29 lines
980 B
YAML

name: Create issue to track porting between Community and Product docs
on:
pull_request_target:
types:
- closed
paths-ignore:
- '**/README.md'
permissions:
issues: write
pull-requests: read
jobs:
create_issue:
if: github.event.pull_request.merged == true && contains( github.event.pull_request.labels.*.name, 'port/community-product')
runs-on: ubuntu-latest
steps:
- name: Create issue
env:
GH_TOKEN: ${{ github.token }}
REPO_TYPE: ${{ contains( github.repository, 'product-docs') && 'Product' || 'Community' }}
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
gh issue create \
--repo ${{ github.repository }} \
--title "Port $REPO_TYPE docs PR #${{ github.event.pull_request.number }}: $PR_TITLE" \
--body "Reference: https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}" \
--label port/community-product