From 68cf2d773d53030328c6c9ed0260475e4b7ca10a Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 19 Dec 2020 16:36:25 -0800 Subject: [PATCH] do additional check for json data, and retry for 5-ish minutes on failure (#1125) --- .github/workflows/release.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b8474967..c959d810 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -162,7 +162,15 @@ jobs: run: brew install pipgrip - name: Query PyPI API - run: curl -Ls https://pypi.org/pypi/jrnl/json > api_response.json + uses: nick-invision/retry@v2 + with: + timeout_seconds: 10 + max_attempts: 30 + retry_wait_seconds: 10 + command: | + curl -Ls https://pypi.org/pypi/jrnl/json > api_response.json + # if query doesn't have our version yet, give it some time before trying again + [[ "null" == "$(jq ".releases[\"${PYPI_VERSION}\"][1].url" -r api_response.json)" ]] && exit 1 - name: Update Homebrew Formula run: >