# SPDX-License-Identifier: MIT name: 'Cascading PR' author: 'Forgejo authors' description: | Create and update a PR in another repository inputs: origin-url: description: 'URL of the Forgejo instance where the PR that triggers the action is located (e.g. https://code.forgejo.org)' required: true origin-repo: description: 'the repository in which the PR was created' required: true origin-token: description: 'a token with write permission on origin-repo' required: true origin-pr: description: 'number of the PR in {orign-repo}' required: true destination-url: description: 'URL of the Forgejo instance where the cascading PR is created or updated (e.g. https://code.forgejo.org)' required: true destination-repo: description: 'the repository in which the cascading PR is created or updated' required: true destination-branch: description: 'the base branch of the destination repository for the cascading PR' required: true destination-token: description: 'a token with write permission on destination-repo' required: true update: description: 'path to the script to update the content of the cascading PR' required: true prefix: description: 'prefix of the cascading PR created on destination-repo (default to {origin-repo})' verbose: description: 'if true print verbose information' default: false debug: description: 'if true print debug information' default: false runs: using: "composite" steps: - uses: actions/checkout@v4 - run: | export PATH=${{ github.action_path }}:$PATH if "${{ inputs.verbose }}"; then verbosity="$verbosity --verbose" fi if "${{ inputs.debug }}"; then verbosity="$verbosity --debug" fi cascading-pr.sh $verbosity \ --origin-url "${{ inputs.origin-url }}" \ --origin-repo "${{ inputs.origin-repo }}" \ --origin-token "${{ inputs.origin-token }}" \ --origin-pr "${{ inputs.origin-pr }}" \ --destination-url "${{ inputs.destination-url }}" \ --destination-repo "${{ inputs.destination-repo }}" \ --destination-token "${{ inputs.destination-token }}" \ --destination-branch "${{ inputs.destination-branch }}" \ --update "${{ inputs.update }}" \ --prefix "${{ inputs.prefix }}" \ run