mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-11-23 21:00:59 -05:00
push self to the test forgejo instance
This commit is contained in:
parent
c92246a058
commit
844a9cd4ff
2 changed files with 15 additions and 18 deletions
|
@ -10,14 +10,5 @@ jobs:
|
|||
./docker.sh
|
||||
./forgejo.sh setup root admin1234 codeberg.org/forgejo/forgejo:1.19
|
||||
./forgejo-runner.sh setup
|
||||
#
|
||||
# Can this Forgejo & runner combination...
|
||||
#
|
||||
#
|
||||
# ...run a demo workflow (stage 0)
|
||||
#
|
||||
# testdata/run.sh workflow http://root:admin1234@$(cat forgejo-ip):3000 root demo
|
||||
#
|
||||
# ...run this integration test (stage 1)
|
||||
#
|
||||
testdata/run.sh self http://root:admin1234@$(cat forgejo-ip):3000 root
|
||||
testdata/run.sh push_self http://root:admin1234@$(cat forgejo-ip):3000 root
|
||||
|
|
22
testdata/run.sh
vendored
22
testdata/run.sh
vendored
|
@ -65,18 +65,24 @@ function workflow() {
|
|||
wait_success "$forgejo" "$owner/$workflow" $(cat $DIR/$workflow/SHA)
|
||||
}
|
||||
|
||||
function self() {
|
||||
function push_self() {
|
||||
local forgejo="$1"
|
||||
local owner="$2"
|
||||
|
||||
local dir="$DIR/self"
|
||||
if git remote | grep -q test-setup-forgejo; then
|
||||
git remote rm test-setup-forgejo
|
||||
fi
|
||||
git remote add test-setup-forgejo $forgejo/$owner/setup-forgejo
|
||||
git push test-setup-forgejo HEAD:main
|
||||
|
||||
wait_success "$forgejo" "$owner/setup-forgejo" $(git rev-parse HEAD)
|
||||
local sha=$(git rev-parse HEAD)
|
||||
git clone . $dir
|
||||
(
|
||||
cd $dir
|
||||
git checkout -b fortesting $sha
|
||||
git remote rm origin
|
||||
git remote add origin $forgejo/$owner/setup-forgejo
|
||||
git rm -r .forgejo
|
||||
git config user.email root@example.com
|
||||
git config user.name username
|
||||
git commit -m 'avoid workflow infinite recursion'
|
||||
git push origin fortesting:main
|
||||
)
|
||||
}
|
||||
|
||||
"$@"
|
||||
|
|
Loading…
Reference in a new issue