mirror of
https://code.forgejo.org/actions/cascading-pr.git
synced 2025-09-11 18:46:15 +00:00
Compare commits
No commits in common. "main" and "v2.2.1" have entirely different histories.
5 changed files with 6 additions and 20 deletions
|
@ -14,7 +14,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
|
||||
- id: forgejo
|
||||
uses: https://code.forgejo.org/actions/setup-forgejo@v3.0.2
|
||||
uses: https://code.forgejo.org/actions/setup-forgejo@v3.0.1
|
||||
with:
|
||||
user: root
|
||||
password: admin1234
|
||||
|
|
|
@ -87,9 +87,8 @@ not exist, it is created.
|
|||
| destination-branch | the base branch of the destination repository for the cascading PR | `true` | |
|
||||
| destination-token | a token with write permission on destination-repo | `true` | |
|
||||
| update | path to the script to update the content of the cascading PR | `true` | |
|
||||
| wait-iteration | number of seconds to wait before verifying for the status of the destination pull request (timeout after 100 iterations) | `true` | 36 |
|
||||
| prefix | prefix of the branch from which the cascading PR is created on {destination-repo} or {destination-fork-repo} (default to {origin-repo}) | `false` | |
|
||||
| close | if true the cascading PR will be closed and the branch deleted when (i) the {origin-pr} is merged or (ii) when the cascading PR status is success if {origin-ref} is set | `false` | false |
|
||||
| close | if true the cascading PR will be closed and the branch deleted when the PR is merged | `false` | false |
|
||||
| verbose | if true print verbose information | `false` | false |
|
||||
| debug | if true print debug information | `false` | false |
|
||||
<!-- action-docs-inputs -->
|
||||
|
@ -101,13 +100,15 @@ linked with workflows using `cascading-pr` as follows.
|
|||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
lxc-helper(lxc-helper) --> runner(runner)
|
||||
lxc-helper(lxc-helper) --> act(act)
|
||||
act --> runner(Forgejo runner)
|
||||
runner --> setup-forgejo(setup-forgejo)
|
||||
setup-forgejo --> e2e(end-to-end)
|
||||
forgejo-curl(forgejo-curl.sh) --> setup-forgejo
|
||||
forgejo(forgejo) --> e2e
|
||||
|
||||
click lxc-helper "https://code.forgejo.org/forgejo/lxc-helpers/src/branch/main/.forgejo/workflows/cascade-runner.yml"
|
||||
click lxc-helper "https://code.forgejo.org/forgejo/lxc-helpers/src/branch/main/.forgejo/workflows/cascade-act.yml"
|
||||
click act "https://code.forgejo.org/forgejo/act/src/branch/main/.forgejo/workflows/cascade-runner.yml"
|
||||
click runner "https://code.forgejo.org/forgejo/runner/src/branch/main/.forgejo/workflows/cascade-setup-forgejo.yml"
|
||||
click setup-forgejo "https://code.forgejo.org/actions/setup-forgejo/src/branch/main/.forgejo/workflows/cascade-end-to-end.yml"
|
||||
click e2e "https://code.forgejo.org/actions/end-to-end"
|
||||
|
|
|
@ -101,10 +101,6 @@ inputs:
|
|||
update:
|
||||
description: 'path to the script to update the content of the cascading PR'
|
||||
required: true
|
||||
wait-iteration:
|
||||
description: 'number of seconds to wait before verifying for the status of the destination pull request (timeout after 100 iterations)'
|
||||
default: 36
|
||||
required: true
|
||||
prefix:
|
||||
description: 'prefix of the branch from which the cascading PR is created on {destination-repo} or {destination-fork-repo} (default to {origin-repo})'
|
||||
close:
|
||||
|
@ -147,7 +143,6 @@ runs:
|
|||
--destination-token "@$destination_token" \
|
||||
--destination-branch "${{ inputs.destination-branch }}" \
|
||||
--update "${{ inputs.update }}" \
|
||||
--wait-iteration "${{ inputs.wait-iteration }}" \
|
||||
--prefix "${{ inputs.prefix }}" \
|
||||
--close "${{ inputs.close }}" \
|
||||
run
|
||||
|
|
|
@ -27,10 +27,6 @@ function dependencies() {
|
|||
fi
|
||||
}
|
||||
|
||||
function set_loop_delay() {
|
||||
LOOP_DELAY="$1"
|
||||
}
|
||||
|
||||
function retry() {
|
||||
rm -f $TMPDIR/retry.{out,attempt,err}
|
||||
local success=false
|
||||
|
|
|
@ -401,7 +401,6 @@ function finalize_options() {
|
|||
else
|
||||
options[destination_is_fork]=false
|
||||
fi
|
||||
set_loop_delay ${options[wait_iteration]}
|
||||
|
||||
: ${options[close]:=false}
|
||||
}
|
||||
|
@ -544,11 +543,6 @@ function main() {
|
|||
options[update]=$1
|
||||
shift
|
||||
;;
|
||||
--wait-iteration)
|
||||
shift
|
||||
options[wait_iteration]=$1
|
||||
shift
|
||||
;;
|
||||
--prefix)
|
||||
shift
|
||||
options[prefix]=$1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue