From 76596e4d37b1ed5fd09078d6821525c4cae03fe0 Mon Sep 17 00:00:00 2001 From: Jonatan Nilsson Date: Sun, 5 Nov 2023 04:09:07 +0000 Subject: [PATCH] try if --- .gitea/workflows/nfp_moe.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/nfp_moe.yaml b/.gitea/workflows/nfp_moe.yaml index 0941ed7..8c68194 100644 --- a/.gitea/workflows/nfp_moe.yaml +++ b/.gitea/workflows/nfp_moe.yaml @@ -16,7 +16,12 @@ jobs: echo "Checking https://git.nfp.is/api/v1/repos/${{ gitea.repository }}/releases for name ${CURR_NAME}" - curl -s -X GET -H "Authorization: token ${{ secrets.deploytoken }}" https://git.nfp.is/api/v1/repos/${{ gitea.repository }}/releases | grep -o "\"name\"\:\"${CURR_NAME}\"" > /dev/null || { export curlexit="hello world"; } + if curl -s -X GET -H "Authorization: token ${{ secrets.deploytoken }}" https://git.nfp.is/api/v1/repos/${{ gitea.repository }}/releases | grep -o "\"name\"\:\"${CURR_NAME}\"" > /dev/null; then + echo "true"; + else + echo "false" + fi + exit 0 echo "$curlexit" if [ $curlexit -eq 0 ] ; then