mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2024-11-21 20:27:17 +03:00
[FORGEJO] workflow cascading-pr to setup-forgejo (#93)
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/93 Reviewed-by: dachary <dachary@noreply.code.forgejo.org> Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
parent
b5b83fd62b
commit
9efc297f1f
2 changed files with 37 additions and 0 deletions
14
.forgejo/cascading-pr-setup-forgejo
Executable file
14
.forgejo/cascading-pr-setup-forgejo
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
setup_forgejo=$1
|
||||
setup_forgejo_pr=$2
|
||||
runner_pr=$3
|
||||
|
||||
url=$(jq --raw-output .head.repo.html_url < $runner_pr)
|
||||
test "$url" != null
|
||||
branch=$(jq --raw-output .head.ref < $runner_pr)
|
||||
test "$branch" != null
|
||||
cd $setup_forgejo
|
||||
./utils/upgrade-runner.sh $url @$branch
|
23
.forgejo/workflows/cascade-setup-forgejo.yml
Normal file
23
.forgejo/workflows/cascade-setup-forgejo.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- closed
|
||||
jobs:
|
||||
cascade:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/cascading-pr@v1
|
||||
with:
|
||||
origin-url: ${{ env.GITHUB_SERVER_URL }}
|
||||
origin-repo: forgejo/runner
|
||||
origin-token: ${{ secrets.CASCADING_PR_ORIGIN }}
|
||||
origin-pr: ${{ github.event.pull_request.number }}
|
||||
destination-url: ${{ env.GITHUB_SERVER_URL }}
|
||||
destination-repo: actions/setup-forgejo
|
||||
destination-branch: main
|
||||
destination-token: ${{ secrets.CASCADING_PR_DESTINATION }}
|
||||
update: .forgejo/cascading-pr-setup-forgejo
|
Loading…
Reference in a new issue