mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-11-30 18:20:56 -05:00
21 lines
700 B
Bash
21 lines
700 B
Bash
|
url=http://root:admin1234@$(cat forgejo-ip):3000
|
||
|
token=$(cat forgejo-token)
|
||
|
repo=root/example-$example
|
||
|
#
|
||
|
# push the repository
|
||
|
#
|
||
|
forgejo-test-helper.sh push_workflow testdata/example-$example $url root example-$example setup-forgejo $token
|
||
|
sha=$(forgejo-test-helper.sh branch_tip $url $repo main)
|
||
|
#
|
||
|
# wait for the workflow (sleep infinity) to start running
|
||
|
#
|
||
|
forgejo-test-helper.sh wait_running $url $repo $sha
|
||
|
#
|
||
|
# push to the same branch
|
||
|
#
|
||
|
forgejo-test-helper.sh push_workflow testdata/example-$example $url root example-$example setup-forgejo $token
|
||
|
#
|
||
|
# wait for the workflow to be canceld as a result of the previous push
|
||
|
#
|
||
|
forgejo-test-helper.sh wait_failure $url $repo $sha 'Has been cancelled'
|