1
0
Fork 0
mirror of https://code.forgejo.org/actions/cascading-pr synced 2025-03-15 06:46:59 +01:00
cascading-pr/action.yml

63 lines
2.3 KiB
YAML
Raw Normal View History

2023-10-11 15:39:52 +02:00
# SPDX-License-Identifier: MIT
name: 'Cascading PR'
author: 'Forgejo authors'
description: |
Create and update a PR in another repository
inputs:
2023-10-11 18:05:11 +02:00
origin-url:
description: 'URL of the Forgejo instance where the PR that triggers the action is located (e.g. https://code.forgejo.org)'
2023-10-11 15:39:52 +02:00
required: true
2023-10-11 18:05:11 +02:00
origin-repo:
description: 'the repository in which the PR was created'
2023-10-11 15:39:52 +02:00
required: true
2023-10-11 18:05:11 +02:00
origin-token:
description: 'a token with write permission on origin-repo'
2023-10-11 15:39:52 +02:00
required: true
2023-10-11 18:05:11 +02:00
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
2023-10-12 14:57:38 +02:00
prefix:
description: 'prefix of the cascading PR created on destination-repo (default to {origin-repo})'
2023-10-11 18:05:11 +02:00
verbose:
description: 'if true print verbose information'
default: false
debug:
description: 'if true print debug information'
default: false
2023-10-11 15:39:52 +02:00
runs:
using: "composite"
steps:
- uses: actions/checkout@v4
- run: |
2023-10-11 18:05:11 +02:00
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 }}" \
--destination-url "${{ inputs.destination-url }}" \
--destination-repo "${{ inputs.destination-repo }}" \
--destination-token "${{ inputs.destination-token }}" \
--destination-branch "${{ inputs.destination-branch }}" \
--update "${{ inputs.update }}"
2023-10-12 14:57:38 +02:00
--prefix "${{ inputs.prefix }}"