mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-11-24 02:41:01 -05:00
23 lines
515 B
Text
23 lines
515 B
Text
|
#!/bin/bash
|
||
|
|
||
|
set -ex
|
||
|
|
||
|
end_to_end=$1
|
||
|
end_to_end_pr=$2
|
||
|
setup_forgejo=$3
|
||
|
setup_forgejo_pr=$4
|
||
|
|
||
|
if test "$(jq --raw-output .state < $setup_forgejo_pr)" = "closed" ; then
|
||
|
echo "closed, do not update"
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
url=$(jq --raw-output .head.repo.html_url < $setup_forgejo_pr)
|
||
|
test "$url" != null
|
||
|
branch=$(jq --raw-output .head.ref < $setup_forgejo_pr)
|
||
|
test "$branch" != null
|
||
|
|
||
|
cd $end_to_end
|
||
|
sed -i -e "s|https://code.forgejo.org/actions/setup-forgejo.*|$url@$branch|" .forgejo/workflows/actions.yml
|
||
|
date > last-upgrade
|