name: Component Release Documentation Update

on:
  release:
    types:
      - created
  workflow_dispatch:

jobs:
  trigger:
    runs-on: ubuntu-latest

    steps:
    - name: Trigger central repository workflow
      run: |
        curl -X POST \
        -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
        -H "Accept: application/vnd.github.v3+json" \
        https://api.github.com/repos/Iconica-Development/iconica_component_documentation/actions/workflows/documentation.yml/dispatches \
        -d '{"ref":"master", "inputs":{"repository_url":"${{ github.event.repository.html_url }}"}}'
