mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2026-10-21 13:31:18 +00:00
ci: tolerate 422 when the latest release tag has no workflow_dispatch
This commit is contained in:
1 parent
94d2f62626
commit
63ee7cb16e
1 file changed
+15
-3
@@ -125,6 +125,18 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "dispatching a rebuild of ${tag}"
|
echo "dispatching a rebuild of ${tag}"
|
||||||
# fails with 422 when the tag's workflow file has no workflow_dispatch
|
# A tag cut before this job existed carries a workflow file with no
|
||||||
# trigger (releases before this job existed); nothing to do then
|
# workflow_dispatch trigger; the API rejects the dispatch with 422.
|
||||||
gh workflow run dockerhub.yml --repo "${GITHUB_REPOSITORY}" --ref "${tag}"
|
# That is expected (nothing to rebuild there), so only a different
|
||||||
|
# error fails the job.
|
||||||
|
if ! out="$(gh workflow run dockerhub.yml --repo "${GITHUB_REPOSITORY}" --ref "${tag}" 2>&1)"; then
|
||||||
|
echo "$out"
|
||||||
|
case "$out" in
|
||||||
|
*"does not have 'workflow_dispatch' trigger"*)
|
||||||
|
echo "::warning::${tag} predates the dispatch trigger; skipping the rebuild"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||