mirror of
https://code.forgejo.org/actions/cascading-pr.git
synced 2025-06-28 04:43:44 +00:00
add a test for forked destination
This commit is contained in:
parent
dd5427bc63
commit
a98dc1dffc
6 changed files with 91 additions and 24 deletions
26
tests/origin-fork-destination/.forgejo/workflows/test.yml
Normal file
26
tests/origin-fork-destination/.forgejo/workflows/test.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
name: test
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- closed
|
||||
jobs:
|
||||
test:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: SELF@vTest
|
||||
with:
|
||||
origin-url: ${{ env.GITHUB_SERVER_URL }}
|
||||
origin-repo: user1/origin-fork-destination
|
||||
origin-token: ${{ secrets.ORIGIN_TOKEN }}
|
||||
origin-pr: ${{ github.event.pull_request.number }}
|
||||
destination-url: ${{ env.GITHUB_SERVER_URL }}
|
||||
destination-repo: user2/destinationrepo
|
||||
destination-fork-repo: user3/destinationrepo
|
||||
destination-branch: main
|
||||
destination-token: ${{ secrets.DESTINATION_TOKEN }}
|
||||
update: ./upgraded
|
||||
debug: true
|
1
tests/origin-fork-destination/README
Normal file
1
tests/origin-fork-destination/README
Normal file
|
@ -0,0 +1 @@
|
|||
originrepo
|
14
tests/origin-fork-destination/upgraded
Executable file
14
tests/origin-fork-destination/upgraded
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
destination_checkout="$1"
|
||||
destination_pr_json="$2"
|
||||
origin_checkout="$3"
|
||||
origin_pr_json="$4"
|
||||
|
||||
test -d $destination_checkout
|
||||
test -d $origin_checkout
|
||||
test -f $origin_pr_json
|
||||
|
||||
date +%s > $destination_checkout/last
|
Loading…
Add table
Add a link
Reference in a new issue