name: Create Pull Request for CLI reference update
on:
  workflow_dispatch:
  push:
    branches:
      - action/constellation/update-cli-reference

jobs:
  pull-request:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
        with:
          ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}

      - name: pull-request
        uses: repo-sync/pull-request@65785d95a5a466e46a9d0708933a3bd51bbf9dde # tag=v2.6.2
        with:
          destination_branch: "main"
          pr_title: "Update CLI reference"
          pr_body: |
            :robot: *This is an automated PR.* :robot:
          github_token: ${{ secrets.GITHUB_TOKEN }}
