implement waiting based on a file
This commit is contained in:
parent
631055d190
commit
c3eb8918b4
2 changed files with 15 additions and 3 deletions
|
@ -3,7 +3,9 @@ repo=root/example-$example
|
|||
# delete the repository
|
||||
#
|
||||
api=$url/api/v1
|
||||
forgejo-curl.sh api_json -X DELETE $api/repos/root/example-$example
|
||||
if forgejo-curl.sh api_json -X GET $api/repos/root/example-$example; then
|
||||
forgejo-curl.sh api_json -X DELETE $api/repos/root/example-$example
|
||||
fi
|
||||
|
||||
#
|
||||
# push the repository
|
||||
|
@ -61,6 +63,10 @@ echo Push to repo again
|
|||
#
|
||||
forgejo-test-helper.sh push_workflow actions/example-echo $url root example-$example setup-forgejo $token
|
||||
|
||||
echo Signal to the workflow that the push has happened
|
||||
mkdir -p /srv/example/schedule-noncancel
|
||||
touch /srv/example/schedule-noncancel/PUSHED
|
||||
|
||||
#
|
||||
# Wait for the workflow to finish anyway
|
||||
#
|
||||
|
@ -71,7 +77,7 @@ checkFinished() {
|
|||
"select status \
|
||||
from action_run \
|
||||
where id = $run_id \
|
||||
and status != 6"
|
||||
and (status != 6 and status != 5)"
|
||||
}
|
||||
|
||||
finished_status=$(checkFinished)
|
||||
|
|
Loading…
Add table
Reference in a new issue